Class GlobalOrdinalsStringTermsAggregator

All Implemented Interfaces:, java.lang.AutoCloseable,, 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<?,​?,​?> resultStrategy
    • valuesSource

      protected final ValuesSource.Bytes.WithOrdinals valuesSource
    • collectionStrategy

      protected final 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
      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
    • buildAggregations

      public InternalAggregation[] buildAggregations​(long[] owningBucketOrds) throws
      Description copied from class: Aggregator
      Build the results of this aggregation.
      Specified by:
      buildAggregations in class Aggregator
      owningBucketOrds - the ordinals of the buckets that we want to collect from this aggregation
      the results for each ordinal, in the same order as the array of ordinals
    • 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.

      collectDebugInfo in class DeferableBucketAggregator
    • doClose

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

      protected StringTerms buildEmptyTermsAggregation()
    • buildEmptySignificantTermsAggregation

      protected SignificantStringTerms buildEmptySignificantTermsAggregation​(long subsetSize, SignificanceHeuristic significanceHeuristic)