Class PipelineAggregationBuilder
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
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
name, [] bucketsPaths)
Constructs a new pipeline aggregator factory. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract PipelineAggregator
create()
Creates the pipeline aggregator[]
Return the consumed buckets paths.getName()
Return this aggregation's name.rewrite(QueryRewriteContext context)
Rewrites this instance based on the provided context.abstract PipelineAggregationBuilder
<,> 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.
, , , , , , , , ,
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
protected final name -
bucketsPaths
protected final [] bucketsPaths
-
-
Constructor Details
-
PipelineAggregationBuilder
protected PipelineAggregationBuilder( name, [] bucketsPaths)Constructs a new pipeline aggregator factory.- Parameters:
name
- The aggregation name
-
-
Method Details
-
getName
public getName()Return this aggregation's name. -
getBucketsPaths
public final [] getBucketsPaths()Return the consumed buckets paths. -
validate
Makes sure this builder is properly configured. -
create
Creates the pipeline aggregator- Returns:
- The created aggregator
-
setMetadata
public abstract <,> metadata)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
public toString()- Overrides:
in class
-
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:
-