Class NestedAggregator

All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable, org.apache.lucene.search.Collector, Releasable, SingleBucketAggregator

public class NestedAggregator
extends BucketsAggregator
implements SingleBucketAggregator
  • Method Details

    • getLeafCollector

      public LeafBucketCollector getLeafCollector​(org.apache.lucene.index.LeafReaderContext ctx, LeafBucketCollector sub) throws java.io.IOException
      Description copied from class: AggregatorBase
      Get a LeafBucketCollector for the given ctx, which should delegate to the given collector.
      Specified by:
      getLeafCollector in class AggregatorBase
      Throws:
      java.io.IOException
    • preGetSubLeafCollectors

      protected void preGetSubLeafCollectors​(org.apache.lucene.index.LeafReaderContext ctx) throws java.io.IOException
      Description copied from class: AggregatorBase
      Can be overridden by aggregator implementations that like the perform an operation before the leaf collectors of children aggregators are instantiated for the next segment.
      Overrides:
      preGetSubLeafCollectors in class BucketsAggregator
      Throws:
      java.io.IOException
    • doPostCollection

      protected void doPostCollection() throws java.io.IOException
      Description copied from class: AggregatorBase
      Can be overridden by aggregator implementation to be called back when the collection phase ends.
      Overrides:
      doPostCollection in class AggregatorBase
      Throws:
      java.io.IOException
    • buildAggregations

      public InternalAggregation[] buildAggregations​(long[] owningBucketOrds) throws java.io.IOException
      Description copied from class: Aggregator
      Build the results of this aggregation.
      Specified by:
      buildAggregations in class Aggregator
      Parameters:
      owningBucketOrds - the ordinals of the buckets that we want to collect from this aggregation
      Returns:
      the results for each ordinal, in the same order as the array of ordinals
      Throws:
      java.io.IOException
    • buildEmptyAggregation

      public InternalAggregation buildEmptyAggregation()
      Description copied from class: Aggregator
      Build an empty aggregation.
      Specified by:
      buildEmptyAggregation in class Aggregator