Class InternalAggregation.ReduceContext

Enclosing class:

public static class InternalAggregation.ReduceContext extends Object
  • Method Details

    • forPartialReduction

      public static InternalAggregation.ReduceContext forPartialReduction(BigArrays bigArrays, ScriptService scriptService, Supplier<PipelineAggregator.PipelineTree> pipelineTreeForBwcSerialization)
      Build a InternalAggregation.ReduceContext to perform a partial reduction.
    • forFinalReduction

      public static InternalAggregation.ReduceContext forFinalReduction(BigArrays bigArrays, ScriptService scriptService, IntConsumer multiBucketConsumer, PipelineAggregator.PipelineTree pipelineTreeRoot)
      Build a InternalAggregation.ReduceContext to perform the final reduction.
      pipelineTreeRoot - The root of tree of pipeline aggregations for this request
    • isFinalReduce

      public boolean isFinalReduce()
      Returns true iff the current reduce phase is the final reduce phase. This indicates if operations like pipeline aggregations should be applied or if specific features like minDocCount should be taken into account. Operations that are potentially losing information can only be applied during the final reduce phase.
    • bigArrays

      public BigArrays bigArrays()
    • scriptService

      public ScriptService scriptService()
    • pipelineTreeRoot

      public PipelineAggregator.PipelineTree pipelineTreeRoot()
      The root of the tree of pipeline aggregations for this request.
    • pipelineTreeForBwcSerialization

      public Supplier<PipelineAggregator.PipelineTree> pipelineTreeForBwcSerialization()
      Supplies the pipelines when the result of the reduce is serialized to node versions that need pipeline aggregators to be serialized to them.
    • consumeBucketsAndMaybeBreak

      public void consumeBucketsAndMaybeBreak(int size)
      Adds count 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