Module org.elasticsearch.server
Class AggregationReduceContext
java.lang.Object
org.elasticsearch.search.aggregations.AggregationReduceContext
- Direct Known Subclasses:
AggregationReduceContext.ForFinal,AggregationReduceContext.ForPartial
public abstract sealed class AggregationReduceContext
extends Object
permits AggregationReduceContext.ForPartial, AggregationReduceContext.ForFinal
Dependencies used to reduce aggs.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuildsAggregationReduceContexts.static final classA AggregationReduceContext to perform the final reduction.static final classA AggregationReduceContext to perform a partial reduction. -
Method Summary
Modifier and TypeMethodDescriptionfinal BigArraysbuilder()Builder for the agg being processed ornullif this context was built for the top level or a pipeline aggregation.protected abstract voidconsumeBucketCountAndMaybeBreak(int size) final voidconsumeBucketsAndMaybeBreak(int size) Addscountbuckets to the global count for the request and fails if this number is greater than the maximum number of buckets allowed in a responsefinal AggregationReduceContextBuild aAggregationReduceContextfor a sub-aggregation.protected abstract AggregationReduceContextabstract booleanReturnstrueiff the current reduce phase is the final reduce phase.abstract PipelineAggregator.PipelineTreeThe root of the tree of pipeline aggregations for this request.final ScriptService
-
Method Details
-
isFinalReduce
public abstract boolean isFinalReduce()Returnstrueiff the current reduce phase is the final reduce phase. This indicates if operations like pipeline aggregations should be applied or if specific features likeminDocCountshould be taken into account. Operations that are potentially losing information can only be applied during the final reduce phase. -
bigArrays
-
scriptService
-
isCanceled
-
builder
Builder for the agg being processed ornullif this context was built for the top level or a pipeline aggregation. -
pipelineTreeRoot
The root of the tree of pipeline aggregations for this request. -
consumeBucketsAndMaybeBreak
public final void consumeBucketsAndMaybeBreak(int size) Addscountbuckets to the global count for the request and fails if this number is greater than the maximum number of buckets allowed in a response -
consumeBucketCountAndMaybeBreak
protected abstract void consumeBucketCountAndMaybeBreak(int size) -
forAgg
Build aAggregationReduceContextfor a sub-aggregation. -
forSubAgg
-