NamedWriteable, Writeable, ToXContent, ToXContentFragment, BaseAggregationBuilderAdjacencyMatrixAggregationBuilder, CompositeAggregationBuilder, FilterAggregationBuilder, FiltersAggregationBuilder, GlobalAggregationBuilder, NestedAggregationBuilder, ReverseNestedAggregationBuilder, SamplerAggregationBuilder, ScriptedMetricAggregationBuilder, SignificantTextAggregationBuilder, TopHitsAggregationBuilder, ValuesSourceAggregationBuilderpublic abstract class AbstractAggregationBuilder<AB extends AbstractAggregationBuilder<AB>> extends AggregationBuilder
AggregationBuilder.AggregationBuilder.CommonFieldsToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
metaData |
factoriesBuilder, nameEMPTY_PARAMS| Modifier | Constructor | Description |
|---|---|---|
|
AbstractAggregationBuilder(java.lang.String name) |
Constructs a new aggregation builder.
|
protected |
AbstractAggregationBuilder(StreamInput in) |
Read from a stream.
|
| Modifier and Type | Method | Description |
|---|---|---|
AggregatorFactory<?> |
build(SearchContext context,
AggregatorFactory<?> parent) |
Internal: build an
AggregatorFactory based on the configuration of this builder. |
protected abstract AggregatorFactory<?> |
doBuild(SearchContext context,
AggregatorFactory<?> parent,
AggregatorFactories.Builder subfactoriesBuilder) |
|
protected abstract boolean |
doEquals(java.lang.Object obj) |
|
protected abstract int |
doHashCode() |
|
protected abstract void |
doWriteTo(StreamOutput out) |
|
boolean |
equals(java.lang.Object obj) |
|
java.util.Map<java.lang.String,java.lang.Object> |
getMetaData() |
Return any associated metadata with this
AggregationBuilder. |
java.lang.String |
getWriteableName() |
Returns the name of the writeable object
|
int |
hashCode() |
|
protected abstract XContentBuilder |
internalXContent(XContentBuilder builder,
ToXContent.Params params) |
|
AB |
setMetaData(java.util.Map<java.lang.String,java.lang.Object> metaData) |
Associate metadata with this
AggregationBuilder. |
AB |
subAggregation(AggregationBuilder aggregation) |
Add a sub aggregation to this builder.
|
AB |
subAggregation(PipelineAggregationBuilder aggregation) |
Add a sub aggregation to this aggregation.
|
AB |
subAggregations(AggregatorFactories.Builder subFactories) |
Registers sub-factories with this factory.
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
|
void |
writeTo(StreamOutput out) |
Write this into the StreamOutput.
|
doRewrite, getName, getPipelineAggregations, getSubAggregations, rewrite, toStringgetTypeclone, finalize, getClass, notify, notifyAll, wait, wait, waitisFragmentpublic AbstractAggregationBuilder(java.lang.String name)
name - The aggregation nameprotected AbstractAggregationBuilder(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic final void writeTo(StreamOutput out) throws java.io.IOException
Writeablejava.io.IOExceptionprotected abstract void doWriteTo(StreamOutput out) throws java.io.IOException
java.io.IOExceptionpublic AB subAggregation(AggregationBuilder aggregation)
AggregationBuildersubAggregation in class AggregationBuilderpublic AB subAggregation(PipelineAggregationBuilder aggregation)
subAggregation in class AggregationBuilderpublic AB subAggregations(AggregatorFactories.Builder subFactories)
subAggregations in interface BaseAggregationBuildersubAggregations in class AggregationBuildersubFactories - The sub-factoriespublic AB setMetaData(java.util.Map<java.lang.String,java.lang.Object> metaData)
AggregationBuilderAggregationBuilder.setMetaData in interface BaseAggregationBuildersetMetaData in class AggregationBuilderpublic java.util.Map<java.lang.String,java.lang.Object> getMetaData()
AggregationBuilderAggregationBuilder.getMetaData in class AggregationBuilderpublic final java.lang.String getWriteableName()
NamedWriteablepublic final AggregatorFactory<?> build(SearchContext context, AggregatorFactory<?> parent) throws java.io.IOException
AggregationBuilderAggregatorFactory based on the configuration of this builder.build in class AggregationBuilderjava.io.IOExceptionprotected abstract AggregatorFactory<?> doBuild(SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subfactoriesBuilder) throws java.io.IOException
java.io.IOExceptionpublic final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOExceptionprotected abstract XContentBuilder internalXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOExceptionpublic int hashCode()
hashCode in class java.lang.Objectprotected abstract int doHashCode()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectprotected abstract boolean doEquals(java.lang.Object obj)