Class DeferableBucketAggregator

All Implemented Interfaces:, java.lang.AutoCloseable,, Releasable
Direct Known Subclasses:
AbstractRareTermsAggregator, SamplerAggregator, TermsAggregator

public abstract class DeferableBucketAggregator
extends BucketsAggregator
  • Constructor Details

  • Method Details

    • doPreCollection

      protected void doPreCollection() throws
      Description copied from class: AggregatorBase
      Can be overridden by aggregator implementation to be called back when the collection phase starts.
      doPreCollection in class AggregatorBase
    • descendsFromGlobalAggregator

      public static boolean descendsFromGlobalAggregator​(Aggregator parent)
    • getDeferringCollector

      public DeferringBucketCollector getDeferringCollector()
    • shouldDefer

      protected boolean shouldDefer​(Aggregator aggregator)
      This method should be overridden by subclasses that want to defer calculation of a child aggregation until a first pass is complete and a set of buckets has been pruned. Deferring collection will require the recording of all doc/bucketIds from the first pass and then the sub class should call runDeferredCollections(long...) for the selected set of buckets that survive the pruning.
      aggregator - the child aggregator
      true if the aggregator should be deferred until a first pass at collection has completed
    • runDeferredCollections

      protected final void runDeferredCollections​(long... bucketOrds) throws