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 ClassesNested 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.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.index.query.Rewriteable
MAX_REWRITE_ROUNDSFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPipelineAggregationBuilder(String name, String[] bucketsPaths)Constructs a new pipeline aggregator factory. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract PipelineAggregatorcreate()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 PipelineAggregationBuildersetMetadata(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 voidMakes sure this builder is properly configured.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.BaseAggregationBuilder
getTypeMethods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableNameMethods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContentMethods 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:
setMetadatain interfaceBaseAggregationBuilder
-
subAggregations
Description copied from interface:BaseAggregationBuilderSet the sub aggregations if this aggregation supports sub aggregations. Returnsthisfor chaining.- Specified by:
subAggregationsin 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:
rewritein interfaceRewriteable<PipelineAggregationBuilder>- Throws:
IOException
-