Class PipelineAggregationBuilder
java.lang.Object
org.elasticsearch.search.aggregations.PipelineAggregationBuilder
- All Implemented Interfaces:
NamedWriteable
,Writeable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
,Rewriteable<PipelineAggregationBuilder>
,BaseAggregationBuilder
- Direct Known Subclasses:
AbstractPipelineAggregationBuilder
public abstract class PipelineAggregationBuilder
extends Object
implements NamedWriteable, BaseAggregationBuilder, org.elasticsearch.common.xcontent.ToXContentFragment, Rewriteable<PipelineAggregationBuilder>
A factory that knows how to create an
PipelineAggregator
of a
specific type.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.elasticsearch.index.query.Rewriteable
MAX_REWRITE_ROUNDS
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ModifierConstructorDescriptionprotected
PipelineAggregationBuilder(String name, String[] bucketsPaths)
Constructs a new pipeline aggregator factory. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract PipelineAggregator
create()
Creates the pipeline aggregatorString[]
Return the consumed buckets paths.getName()
Return this aggregation's name.rewrite(QueryRewriteContext context)
Rewrites this instance based on the provided context.abstract PipelineAggregationBuilder
setMetadata(Map<String,Object> metadata)
Associate metadata with thisPipelineAggregationBuilder
.subAggregations(AggregatorFactories.Builder subFactories)
Set the sub aggregations if this aggregation supports sub aggregations.toString()
protected abstract void
Makes sure this builder 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
-
Field Details
-
name
-
bucketsPaths
-
-
Constructor Details
-
PipelineAggregationBuilder
Constructs a new pipeline aggregator factory.- Parameters:
name
- The aggregation name
-
-
Method Details
-
getName
Return this aggregation's name. -
getBucketsPaths
Return the consumed buckets paths. -
validate
Makes sure this builder is properly configured. -
create
Creates the pipeline aggregator- Returns:
- The created aggregator
-
setMetadata
Associate metadata with thisPipelineAggregationBuilder
.- Specified by:
setMetadata
in interfaceBaseAggregationBuilder
-
subAggregations
Description copied from interface:BaseAggregationBuilder
Set the sub aggregations if this aggregation supports sub aggregations. Returnsthis
for chaining.- Specified by:
subAggregations
in interfaceBaseAggregationBuilder
-
toString
-
rewrite
Rewrites this instance based on the provided context. The returned objects will be the same instance as this if no changes during the rewrite were applied.The default implementation return the same instance. It should be overridden by aggregations that must load data before they can be run, particularly if that load must by asynchronous.
- Specified by:
rewrite
in interfaceRewriteable<PipelineAggregationBuilder>
- Throws:
IOException
-