public class FiltersAggregationBuilder extends AbstractAggregationBuilder<FiltersAggregationBuilder>
AggregationBuilder.CommonFields
Writeable.Reader<V>, Writeable.Writer<V>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
metaData
factoriesBuilder, name
EMPTY_PARAMS
Constructor and Description |
---|
FiltersAggregationBuilder(StreamInput in)
Read from a stream.
|
FiltersAggregationBuilder(java.lang.String name,
FiltersAggregator.KeyedFilter... filters) |
FiltersAggregationBuilder(java.lang.String name,
QueryBuilder... filters) |
Modifier and Type | Method and Description |
---|---|
protected AggregatorFactory<?> |
doBuild(SearchContext context,
AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder) |
protected boolean |
doEquals(java.lang.Object obj) |
protected int |
doHashCode() |
protected void |
doWriteTo(StreamOutput out) |
java.util.List<FiltersAggregator.KeyedFilter> |
filters()
Get the filters.
|
java.lang.String |
getType()
The name of the type of aggregation built by this builder.
|
protected XContentBuilder |
internalXContent(XContentBuilder builder,
ToXContent.Params params) |
boolean |
otherBucket()
Get whether to include a bucket for documents not matching any filter
|
FiltersAggregationBuilder |
otherBucket(boolean otherBucket)
Set whether to include a bucket for documents not matching any filter
|
java.lang.String |
otherBucketKey()
Get the key to use for the bucket for documents not matching any
filter.
|
FiltersAggregationBuilder |
otherBucketKey(java.lang.String otherBucketKey)
Set the key to use for the bucket for documents not matching any
filter.
|
static FiltersAggregationBuilder |
parse(java.lang.String aggregationName,
QueryParseContext context) |
build, equals, getWriteableName, hashCode, setMetaData, subAggregation, subAggregation, subAggregations, toXContent, writeTo
getName
buildAsBytes, buildAsBytes, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isFragment
public static final java.lang.String NAME
public FiltersAggregationBuilder(java.lang.String name, FiltersAggregator.KeyedFilter... filters)
name
- the name of this aggregationfilters
- the KeyedFilters to use with this aggregation.public FiltersAggregationBuilder(java.lang.String name, QueryBuilder... filters)
name
- the name of this aggregationfilters
- the filters to use with this aggregationpublic FiltersAggregationBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
protected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class AbstractAggregationBuilder<FiltersAggregationBuilder>
java.io.IOException
public FiltersAggregationBuilder otherBucket(boolean otherBucket)
public boolean otherBucket()
public java.util.List<FiltersAggregator.KeyedFilter> filters()
public FiltersAggregationBuilder otherBucketKey(java.lang.String otherBucketKey)
public java.lang.String otherBucketKey()
protected AggregatorFactory<?> doBuild(SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException
doBuild
in class AbstractAggregationBuilder<FiltersAggregationBuilder>
java.io.IOException
protected XContentBuilder internalXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
internalXContent
in class AbstractAggregationBuilder<FiltersAggregationBuilder>
java.io.IOException
public static FiltersAggregationBuilder parse(java.lang.String aggregationName, QueryParseContext context) throws java.io.IOException
java.io.IOException
protected int doHashCode()
doHashCode
in class AbstractAggregationBuilder<FiltersAggregationBuilder>
protected boolean doEquals(java.lang.Object obj)
doEquals
in class AbstractAggregationBuilder<FiltersAggregationBuilder>
public java.lang.String getType()
BaseAggregationBuilder