Class InternalAggregation.ReduceContext

  • Enclosing class:
    InternalAggregation

    public static class InternalAggregation.ReduceContext
    extends java.lang.Object
    • Method Summary

      Modifier and Type Method Description
      BigArrays bigArrays()  
      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
      boolean isFinalReduce()
      Returns true iff the current reduce phase is the final reduce phase.
      ScriptService scriptService()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReduceContext

        public ReduceContext​(BigArrays bigArrays,
                             ScriptService scriptService,
                             boolean isFinalReduce)
      • ReduceContext

        public ReduceContext​(BigArrays bigArrays,
                             ScriptService scriptService,
                             java.util.function.IntConsumer multiBucketConsumer,
                             boolean isFinalReduce)
    • Method Detail

      • 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.
      • 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