Class PipelineAggregationBuilder
- java.lang.Object
-
- org.elasticsearch.search.aggregations.PipelineAggregationBuilder
-
- All Implemented Interfaces:
NamedWriteable
,Writeable
,ToXContent
,ToXContentFragment
,BaseAggregationBuilder
- Direct Known Subclasses:
AbstractPipelineAggregationBuilder
public abstract class PipelineAggregationBuilder extends java.lang.Object implements NamedWriteable, BaseAggregationBuilder, ToXContentFragment
A factory that knows how to create anPipelineAggregator
of a specific type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]
bucketsPaths
protected java.lang.String
name
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PipelineAggregationBuilder(java.lang.String name, java.lang.String[] bucketsPaths)
Constructs a new pipeline aggregator factory.
-
Method Summary
Modifier and Type Method Description protected abstract PipelineAggregator
create()
Creates the pipeline aggregatorjava.lang.String[]
getBucketsPaths()
Return the consumed buckets paths.java.lang.String
getName()
Return this aggregation's name.abstract PipelineAggregationBuilder
setMetaData(java.util.Map<java.lang.String,java.lang.Object> metaData)
Associate metadata with thisPipelineAggregationBuilder
.PipelineAggregationBuilder
subAggregations(AggregatorFactories.Builder subFactories)
Set the sub aggregations if this aggregation supports sub aggregations.java.lang.String
toString()
protected abstract void
validate(AggregatorFactory<?> parent, java.util.Collection<AggregationBuilder> aggregationBuilders, java.util.Collection<PipelineAggregationBuilder> pipelineAggregatorBuilders)
Internal: Validates the state of this factory (makes sure the factory is properly configured)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.search.aggregations.BaseAggregationBuilder
getType
-
Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContent
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Return this aggregation's name.
-
getBucketsPaths
public final java.lang.String[] getBucketsPaths()
Return the consumed buckets paths.
-
validate
protected abstract void validate(AggregatorFactory<?> parent, java.util.Collection<AggregationBuilder> aggregationBuilders, java.util.Collection<PipelineAggregationBuilder> pipelineAggregatorBuilders)
Internal: Validates the state of this factory (makes sure the factory is properly configured)
-
create
protected abstract PipelineAggregator create() throws java.io.IOException
Creates the pipeline aggregator- Returns:
- The created aggregator
- Throws:
java.io.IOException
-
setMetaData
public abstract PipelineAggregationBuilder setMetaData(java.util.Map<java.lang.String,java.lang.Object> metaData)
Associate metadata with thisPipelineAggregationBuilder
.- Specified by:
setMetaData
in interfaceBaseAggregationBuilder
-
subAggregations
public PipelineAggregationBuilder subAggregations(AggregatorFactories.Builder subFactories)
Description copied from interface:BaseAggregationBuilder
Set the sub aggregations if this aggregation supports sub aggregations. Returnsthis
for chaining.- Specified by:
subAggregations
in interfaceBaseAggregationBuilder
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-