27 lines
789 B
Plaintext
27 lines
789 B
Plaintext
[[query-dsl-wrapper-query]]
|
|
=== Wrapper query
|
|
++++
|
|
<titleabbrev>Wrapper</titleabbrev>
|
|
++++
|
|
|
|
A query that accepts any other query as base64 encoded string.
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
GET /_search
|
|
{
|
|
"query" : {
|
|
"wrapper": {
|
|
"query" : "eyJ0ZXJtIiA6IHsgInVzZXIiIDogIktpbWNoeSIgfX0=" <1>
|
|
}
|
|
}
|
|
}
|
|
--------------------------------------------------
|
|
// CONSOLE
|
|
|
|
<1> Base64 encoded string: `{"term" : { "user" : "Kimchy" }}`
|
|
|
|
This query is more useful in the context of the Java high-level REST client or
|
|
transport client to also accept queries as json formatted string.
|
|
In these cases queries can be specified as a json or yaml formatted string or
|
|
as a query builder (which is a available in the Java high-level REST client). |