public abstract class AbstractAggregationBuilder<AB extends AbstractAggregationBuilder<AB>> extends AggregationBuilder
AggregationBuilder
.AggregationBuilder.CommonFields
Writeable.Reader<V>, Writeable.Writer<V>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
metaData |
factoriesBuilder, name, type
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
AbstractAggregationBuilder(StreamInput in,
InternalAggregation.Type type)
Read from a stream.
|
|
AbstractAggregationBuilder(java.lang.String name,
InternalAggregation.Type type)
Constructs a new aggregation builder.
|
Modifier and Type | Method and Description |
---|---|
AggregatorFactory<?> |
build(AggregationContext context,
AggregatorFactory<?> parent)
Internal: build an
AggregatorFactory based on the configuration of this builder. |
protected abstract AggregatorFactory<?> |
doBuild(AggregationContext 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.lang.String |
getType() |
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.
|
getName
buildAsBytes, buildAsBytes, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getWriteableName
public AbstractAggregationBuilder(java.lang.String name, InternalAggregation.Type type)
name
- The aggregation nametype
- The aggregation typeprotected AbstractAggregationBuilder(StreamInput in, InternalAggregation.Type type) throws java.io.IOException
java.io.IOException
public final void writeTo(StreamOutput out) throws java.io.IOException
Writeable
java.io.IOException
protected abstract void doWriteTo(StreamOutput out) throws java.io.IOException
java.io.IOException
public AB subAggregation(AggregationBuilder aggregation)
AggregationBuilder
subAggregation
in class AggregationBuilder
public AB subAggregation(PipelineAggregationBuilder aggregation)
subAggregation
in class AggregationBuilder
public AB subAggregations(AggregatorFactories.Builder subFactories)
subAggregations
in class AggregationBuilder
subFactories
- The sub-factoriespublic AB setMetaData(java.util.Map<java.lang.String,java.lang.Object> metaData)
AggregationBuilder
AggregationBuilder
.setMetaData
in class AggregationBuilder
public java.lang.String getType()
public final AggregatorFactory<?> build(AggregationContext context, AggregatorFactory<?> parent) throws java.io.IOException
AggregationBuilder
AggregatorFactory
based on the configuration of this builder.build
in class AggregationBuilder
java.io.IOException
protected abstract AggregatorFactory<?> doBuild(AggregationContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subfactoriesBuilder) throws java.io.IOException
java.io.IOException
public final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOException
protected abstract XContentBuilder internalXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOException
public int hashCode()
hashCode
in class java.lang.Object
protected abstract int doHashCode()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
protected abstract boolean doEquals(java.lang.Object obj)