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
Modifier and TypeClassDescriptionstatic interface
BuildsAggregationReduceContext
s.static final class
A AggregationReduceContext to perform the final reduction.static final class
A AggregationReduceContext to perform a partial reduction. -
Method Summary
Modifier and TypeMethodDescriptionfinal BigArrays
builder()
Builder for the agg being processed ornull
if this context was built for the top level or a pipeline aggregation.protected abstract void
consumeBucketCountAndMaybeBreak
(int size) final void
consumeBucketsAndMaybeBreak
(int size) Addscount
buckets to the global count for the request and fails if this number is greater than the maximum number of buckets allowed in a responsefinal AggregationReduceContext
Build aAggregationReduceContext
for a sub-aggregation.protected abstract AggregationReduceContext
abstract boolean
Returnstrue
iff the current reduce phase is the final reduce phase.abstract PipelineAggregator.PipelineTree
The root of the tree of pipeline aggregations for this request.final ScriptService
-
Method Details
-
isFinalReduce
public abstract boolean isFinalReduce()Returnstrue
iff the current reduce phase is the final reduce phase. This indicates if operations like pipeline aggregations should be applied or if specific features likeminDocCount
should 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 ornull
if 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) Addscount
buckets 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 aAggregationReduceContext
for a sub-aggregation. -
forSubAgg
-