Class GlobalOrdinalsStringTermsAggregator

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

public class GlobalOrdinalsStringTermsAggregator
extends TermsAggregator
An aggregator of string values that relies on global ordinals in order to build buckets.
  • Field Details

    • resultStrategy

      protected final org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.ResultStrategy<?,​?,​?> resultStrategy
    • valuesSource

      protected final ValuesSource.Bytes.WithOrdinals valuesSource
    • collectionStrategy

      protected final org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.CollectionStrategy collectionStrategy
    • segmentsWithSingleValuedOrds

      protected int segmentsWithSingleValuedOrds
    • segmentsWithMultiValuedOrds

      protected int segmentsWithMultiValuedOrds
    • showTermDocCountError

      protected final boolean showTermDocCountError
  • Constructor Details

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

      public void collectDebugInfo​(java.util.function.BiConsumer<java.lang.String,​java.lang.Object> add)
      Description copied from class: Aggregator
      Collect debug information to add to the profiling results. This will only be called if the aggregation is being profiled.

      Well behaved implementations will always call the superclass implementation just in case it has something interesting. They will also only add objects which can be serialized with StreamOutput.writeGenericValue(Object) and XContentBuilder.value(Object). And they'll have an integration test.

      Overrides:
      collectDebugInfo in class DeferableBucketAggregator
    • doClose

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

      protected StringTerms buildEmptyTermsAggregation()
    • buildEmptySignificantTermsAggregation

      protected SignificantStringTerms buildEmptySignificantTermsAggregation​(long subsetSize, SignificanceHeuristic significanceHeuristic)