Class InternalAggregation.ReduceContext
java.lang.Object
org.elasticsearch.search.aggregations.InternalAggregation.ReduceContext
- Enclosing class:
- InternalAggregation
public static class InternalAggregation.ReduceContext
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description ReduceContext(BigArrays bigArrays, ScriptService scriptService, boolean isFinalReduce)ReduceContext(BigArrays bigArrays, ScriptService scriptService, java.util.function.IntConsumer multiBucketConsumer, boolean isFinalReduce) -
Method Summary
Modifier and Type Method Description BigArraysbigArrays()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 responsebooleanisFinalReduce()Returnstrueiff the current reduce phase is the final reduce phase.ScriptServicescriptService()
-
Constructor Details
-
ReduceContext
-
ReduceContext
public ReduceContext(BigArrays bigArrays, ScriptService scriptService, java.util.function.IntConsumer multiBucketConsumer, boolean isFinalReduce)
-
-
Method Details
-
isFinalReduce
public 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
-
consumeBucketsAndMaybeBreak
public 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
-