Wrapper query

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

  1. GET /_search
  2. {
  3. "query": {
  4. "wrapper": {
  5. "query": "eyJ0ZXJtIiA6IHsgInVzZXIuaWQiIDogImtpbWNoeSIgfX0="
  6. }
  7. }
  8. }

Base64 encoded string: {“term” : { “user.id” : “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).