Class MetricsAggregator

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

public abstract class MetricsAggregator
extends AggregatorBase
  • Constructor Details

    • MetricsAggregator

      protected MetricsAggregator​(java.lang.String name, AggregationContext context, Aggregator parent, java.util.Map<java.lang.String,​java.lang.Object> metadata) throws java.io.IOException
      Throws:
      java.io.IOException
  • Method Details

    • buildAggregation

      public abstract InternalAggregation buildAggregation​(long owningBucketOrd) throws java.io.IOException
      Build an aggregation for data that has been collected into owningBucketOrd.
      Throws:
      java.io.IOException
    • buildAggregations

      public final 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