elasticsearch/docs/reference/query-languages/query-dsl-wrapper-query.md
Colleen McGinnis b7e3a1e14b
[docs] Migrate docs from AsciiDoc to Markdown (#123507)
* delete asciidoc files

* add migrated files

* fix errors

* Disable docs tests

* Clarify release notes page titles

* Revert "Clarify release notes page titles"

This reverts commit 8be688648d.

* Comment out edternal URI images

* Clean up query languages landing pages, link to conceptual docs

* Add .md to url

* Fixes inference processor nesting.

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: Liam Thompson <leemthompo@gmail.com>
Co-authored-by: Martijn Laarman <Mpdreamz@gmail.com>
Co-authored-by: István Zoltán Szabó <szabosteve@gmail.com>
2025-02-27 17:56:14 +01:00

840 B
Raw Blame History

navigation_title mapped_pages
Wrapper
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wrapper-query.html

Wrapper query [query-dsl-wrapper-query]

A query that accepts any other query as base64 encoded string.

GET /_search
{
  "query": {
    "wrapper": {
      "query": "eyJ0ZXJtIiA6IHsgInVzZXIuaWQiIDogImtpbWNoeSIgfX0=" <1>
    }
  }
}
  1. Base64 encoded string: {"term" : { "user.id" : "kimchy" }}

This query is more useful in the context of Spring Data Elasticsearch. Its the way a user can add custom queries when using Spring Data repositories. The user can add a @Query() annotation to a repository method. When such a method is called we do a parameter replacement in the query argument of the annotation and then send this as the query part of a search request.