Class PipelineAggregationBuilder
java.lang.Object
org.opensearch.search.aggregations.PipelineAggregationBuilder
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.NamedWriteable
,org.opensearch.core.common.io.stream.Writeable
,org.opensearch.core.xcontent.ToXContent
,org.opensearch.core.xcontent.ToXContentFragment
,Rewriteable<PipelineAggregationBuilder>
,BaseAggregationBuilder
- Direct Known Subclasses:
AbstractPipelineAggregationBuilder
@PublicApi(since="1.0.0")
public abstract class PipelineAggregationBuilder
extends Object
implements org.opensearch.core.common.io.stream.NamedWriteable, BaseAggregationBuilder, org.opensearch.core.xcontent.ToXContentFragment, Rewriteable<PipelineAggregationBuilder>
A factory that knows how to create an
PipelineAggregator
of a
specific type.- Opensearch.api:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The context used for validationNested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.opensearch.index.query.Rewriteable
MAX_REWRITE_ROUNDS
Fields inherited from interface org.opensearch.core.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 aggregatorfinal String[]
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.opensearch.search.aggregations.BaseAggregationBuilder
getType
Methods inherited from interface org.opensearch.core.common.io.stream.NamedWriteable
getWriteableName
Methods inherited from interface org.opensearch.core.xcontent.ToXContent
toXContent
Methods inherited from interface org.opensearch.core.xcontent.ToXContentFragment
isFragment
Methods inherited from interface org.opensearch.core.common.io.stream.Writeable
writeTo
-
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
-