NamedWriteable
, Writeable
, ToXContent
, ToXContentFragment
, BaseAggregationBuilder
public class FilterAggregationBuilder extends AbstractAggregationBuilder<FilterAggregationBuilder>
AggregationBuilder.CommonFields
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
NAME |
metaData
factoriesBuilder, name
EMPTY_PARAMS
Constructor | Description |
---|---|
FilterAggregationBuilder(java.lang.String name,
QueryBuilder filter) |
|
FilterAggregationBuilder(StreamInput in) |
Read from a stream.
|
Modifier and Type | Method | Description |
---|---|---|
protected AggregatorFactory<?> |
doBuild(SearchContext context,
AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder) |
|
protected boolean |
doEquals(java.lang.Object obj) |
|
protected int |
doHashCode() |
|
protected AggregationBuilder |
doRewrite(QueryRewriteContext queryShardContext) |
Rewrites this aggregation builder into its primitive form.
|
protected void |
doWriteTo(StreamOutput out) |
|
QueryBuilder |
getFilter() |
|
java.lang.String |
getType() |
The name of the type of aggregation built by this builder.
|
protected XContentBuilder |
internalXContent(XContentBuilder builder,
ToXContent.Params params) |
|
static FilterAggregationBuilder |
parse(java.lang.String aggregationName,
XContentParser parser) |
build, equals, getMetaData, getWriteableName, hashCode, setMetaData, subAggregation, subAggregation, subAggregations, toXContent, writeTo
getName, getPipelineAggregations, getSubAggregations, rewrite, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isFragment
public static final java.lang.String NAME
public FilterAggregationBuilder(java.lang.String name, QueryBuilder filter)
name
- the name of this aggregationfilter
- Set the filter to use, only documents that match this
filter will fall into the bucket defined by this
Filter
aggregation.public FilterAggregationBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
protected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class AbstractAggregationBuilder<FilterAggregationBuilder>
java.io.IOException
protected AggregationBuilder doRewrite(QueryRewriteContext queryShardContext) throws java.io.IOException
AggregationBuilder
doRewrite
in class AggregationBuilder
java.io.IOException
protected AggregatorFactory<?> doBuild(SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException
doBuild
in class AbstractAggregationBuilder<FilterAggregationBuilder>
java.io.IOException
protected XContentBuilder internalXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
internalXContent
in class AbstractAggregationBuilder<FilterAggregationBuilder>
java.io.IOException
public static FilterAggregationBuilder parse(java.lang.String aggregationName, XContentParser parser) throws java.io.IOException
java.io.IOException
protected int doHashCode()
doHashCode
in class AbstractAggregationBuilder<FilterAggregationBuilder>
protected boolean doEquals(java.lang.Object obj)
doEquals
in class AbstractAggregationBuilder<FilterAggregationBuilder>
public java.lang.String getType()
BaseAggregationBuilder
public QueryBuilder getFilter()