Class LongRareTermsAggregator

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

public class LongRareTermsAggregator
extends AbstractRareTermsAggregator
An aggregator that finds "rare" string values (e.g. terms agg that orders ascending)
  • Method Details

    • getValues

      protected org.apache.lucene.index.SortedNumericDocValues getValues​(ValuesSource.Numeric valuesSource, org.apache.lucene.index.LeafReaderContext ctx) throws java.io.IOException
      Throws:
      java.io.IOException
    • 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
    • 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
    • doClose

      public void doClose()
      Description copied from class: AggregatorBase
      Release instance-specific data.
      Overrides:
      doClose in class AggregatorBase