Class QueryPhaseResultConsumer

java.lang.Object
org.elasticsearch.action.search.QueryPhaseResultConsumer
All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable, Releasable

public class QueryPhaseResultConsumer
extends java.lang.Object
implements Releasable
A ArraySearchPhaseResults implementation that incrementally reduces aggregation results as shard results are consumed. This implementation adds the memory that it used to save and reduce the results of shard aggregations in the CircuitBreaker.REQUEST circuit breaker. Before any partial or final reduce, the memory needed to reduce the aggregations is estimated and a CircuitBreakingException is thrown if it exceeds the maximum memory allowed in this breaker.
  • Constructor Details

  • Method Details

    • close

      public void close()
      Specified by:
      close in interface java.lang.AutoCloseable
      Specified by:
      close in interface java.io.Closeable
      Specified by:
      close in interface Releasable
    • consumeResult

      public void consumeResult​(SearchPhaseResult result, java.lang.Runnable next)
    • reduce

      public SearchPhaseController.ReducedQueryPhase reduce() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • getNumReducePhases

      public int getNumReducePhases()