org.elasticsearch.index.query.json
Class BoolJsonFilterBuilder

java.lang.Object
  extended by org.elasticsearch.index.query.json.BaseJsonQueryBuilder
      extended by org.elasticsearch.index.query.json.BoolJsonFilterBuilder
All Implemented Interfaces:
JsonQueryBuilder, QueryBuilder, ToJson

public class BoolJsonFilterBuilder
extends BaseJsonQueryBuilder

A filter that matches documents matching boolean combinations of other filters.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.util.json.ToJson
ToJson.MapParams, ToJson.Params
 
Field Summary
 
Fields inherited from interface org.elasticsearch.util.json.ToJson
EMPTY_PARAMS
 
Constructor Summary
BoolJsonFilterBuilder()
           
 
Method Summary
protected  void doJson(JsonBuilder builder, ToJson.Params params)
           
 BoolJsonFilterBuilder must(JsonFilterBuilder filterBuilder)
          Adds a filter that must appear in the matching documents.
 BoolJsonFilterBuilder mustNot(JsonFilterBuilder filterBuilder)
          Adds a filter that must not appear in the matching documents.
 BoolJsonFilterBuilder should(JsonFilterBuilder filterBuilder)
          Adds a filter that should appear in the matching documents.
 
Methods inherited from class org.elasticsearch.index.query.json.BaseJsonQueryBuilder
buildAsBytes, buildAsString, buildAsUnsafeChars, toJson
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoolJsonFilterBuilder

public BoolJsonFilterBuilder()
Method Detail

must

public BoolJsonFilterBuilder must(JsonFilterBuilder filterBuilder)
Adds a filter that must appear in the matching documents.


mustNot

public BoolJsonFilterBuilder mustNot(JsonFilterBuilder filterBuilder)
Adds a filter that must not appear in the matching documents.


should

public BoolJsonFilterBuilder should(JsonFilterBuilder filterBuilder)
Adds a filter that should appear in the matching documents. For a boolean filter with no MUST clauses one or more SHOULD clauses must match a document for the BooleanQuery to match.


doJson

protected void doJson(JsonBuilder builder,
                      ToJson.Params params)
               throws java.io.IOException
Specified by:
doJson in class BaseJsonQueryBuilder
Throws:
java.io.IOException