Class WrapperQueryBuilder

All Implemented Interfaces:
NamedWriteable, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject, QueryBuilder, Rewriteable<QueryBuilder>

public class WrapperQueryBuilder extends AbstractQueryBuilder<WrapperQueryBuilder>
A Query builder which allows building a query given JSON string or binary data provided as input. This is useful when you want to use the Java Builder API but still have JSON query strings at hand that you want to combine with other query builders.

Example usage in a boolean query :

 
      BoolQueryBuilder bool = new BoolQueryBuilder();
      bool.must(new WrapperQueryBuilder("{\"term\": {\"field\":\"value\"}}"));
      bool.must(new TermQueryBuilder("field2","value2"));