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
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
AbstractAggregationBuilder(StreamInput in)
Read from a stream.
|
|
AbstractAggregationBuilder(java.lang.String name)
Constructs a new aggregation builder.
|
Modifier and Type | Method and 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, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isFragment
getType
public AbstractAggregationBuilder(java.lang.String name)
name
- The aggregation nameprotected AbstractAggregationBuilder(StreamInput in) 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 interface BaseAggregationBuilder
subAggregations
in class AggregationBuilder
subFactories
- The sub-factoriespublic AB setMetaData(java.util.Map<java.lang.String,java.lang.Object> metaData)
AggregationBuilder
AggregationBuilder
.setMetaData
in interface BaseAggregationBuilder
setMetaData
in class AggregationBuilder
public java.util.Map<java.lang.String,java.lang.Object> getMetaData()
AggregationBuilder
AggregationBuilder
.getMetaData
in class AggregationBuilder
public final java.lang.String getWriteableName()
NamedWriteable
public final AggregatorFactory<?> build(SearchContext 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(SearchContext 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)