Class AbstractHistogramAggregator

All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable, org.apache.lucene.search.Collector, Releasable
Direct Known Subclasses:
NumericHistogramAggregator, RangeHistogramAggregator

public abstract class AbstractHistogramAggregator
extends BucketsAggregator
Base class for functionality shared between aggregators for this histogram aggregation.
  • Field Details

    • formatter

      protected final DocValueFormat formatter
    • interval

      protected final double interval
    • offset

      protected final double offset
    • order

      protected final BucketOrder order
    • keyed

      protected final boolean keyed
    • minDocCount

      protected final long minDocCount
    • extendedBounds

      protected final DoubleBounds extendedBounds
    • hardBounds

      protected final DoubleBounds hardBounds
    • bucketOrds

      protected final LongKeyedBucketOrds bucketOrds
  • Constructor Details

  • Method Details

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