public class BoolFilterBuilder extends BaseFilterBuilder
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsEMPTY_PARAMS| Constructor and Description |
|---|
BoolFilterBuilder() |
| Modifier and Type | Method and Description |
|---|---|
BoolFilterBuilder |
cache(boolean cache)
Should the filter be cached or not.
|
BoolFilterBuilder |
cacheKey(String cacheKey) |
protected void |
doXContent(XContentBuilder builder,
ToXContent.Params params) |
BoolFilterBuilder |
filterName(String filterName)
Sets the filter name for the filter that can be used when searching for matched_filters per hit.
|
boolean |
hasClauses()
Returns
true iff this filter builder has at least one should, must or mustNot clause. |
BoolFilterBuilder |
must(FilterBuilder... filterBuilders)
Adds multiple must filters.
|
BoolFilterBuilder |
must(FilterBuilder filterBuilder)
Adds a filter that must appear in the matching documents.
|
BoolFilterBuilder |
mustNot(FilterBuilder... filterBuilders)
Adds multiple must not filters.
|
BoolFilterBuilder |
mustNot(FilterBuilder filterBuilder)
Adds a filter that must not appear in the matching documents.
|
BoolFilterBuilder |
should(FilterBuilder... filterBuilders)
Adds multiple should filters.
|
BoolFilterBuilder |
should(FilterBuilder filterBuilder)
Adds a filter that should appear in the matching documents.
|
buildAsBytes, buildAsBytes, toString, toXContentpublic BoolFilterBuilder must(FilterBuilder filterBuilder)
public BoolFilterBuilder mustNot(FilterBuilder filterBuilder)
public BoolFilterBuilder should(FilterBuilder filterBuilder)
SHOULD clauses must match a document
for the BooleanQuery to match.public BoolFilterBuilder must(FilterBuilder... filterBuilders)
public BoolFilterBuilder mustNot(FilterBuilder... filterBuilders)
public BoolFilterBuilder should(FilterBuilder... filterBuilders)
public boolean hasClauses()
true iff this filter builder has at least one should, must or mustNot clause.
Otherwise false.public BoolFilterBuilder filterName(String filterName)
public BoolFilterBuilder cache(boolean cache)
public BoolFilterBuilder cacheKey(String cacheKey)
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContent in class BaseFilterBuilderIOExceptionCopyright © 2009–2016. All rights reserved.