Class ProfilingAggregator

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

public class ProfilingAggregator
extends Aggregator
  • Constructor Details

    • ProfilingAggregator

      public ProfilingAggregator​(Aggregator delegate, AggregationProfiler profiler) throws java.io.IOException
      Throws:
      java.io.IOException
  • Method Details

    • close

      public void close()
    • scoreMode

      public org.apache.lucene.search.ScoreMode scoreMode()
    • name

      public java.lang.String name()
      Description copied from class: Aggregator
      Return the name of this aggregator.
      Specified by:
      name in class Aggregator
    • parent

      public Aggregator parent()
      Description copied from class: Aggregator
      Return the parent aggregator.
      Specified by:
      parent in class Aggregator
    • subAggregator

      public Aggregator subAggregator​(java.lang.String name)
      Description copied from class: Aggregator
      Return the sub aggregator with the provided name.
      Specified by:
      subAggregator in class Aggregator
    • resolveSortPath

      public Aggregator resolveSortPath​(AggregationPath.PathElement next, java.util.Iterator<AggregationPath.PathElement> path)
      Description copied from class: Aggregator
      Resolve a sort path to the target.

      The default implementation throws an exception but we override it on aggregations that support sorting.

      Overrides:
      resolveSortPath in class Aggregator
    • bucketComparator

      public Aggregator.BucketComparator bucketComparator​(java.lang.String key, SortOrder order)
      Description copied from class: Aggregator
      Builds a comparator that compares two buckets aggregated by this Aggregator.

      The default implementation throws an exception but we override it on aggregations that support sorting.

      Overrides:
      bucketComparator in class Aggregator
    • 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
    • getLeafCollector

      public LeafBucketCollector getLeafCollector​(org.apache.lucene.index.LeafReaderContext ctx) throws java.io.IOException
      Specified by:
      getLeafCollector in interface org.apache.lucene.search.Collector
      Specified by:
      getLeafCollector in class BucketCollector
      Throws:
      java.io.IOException
    • preCollection

      public void preCollection() throws java.io.IOException
      Description copied from class: BucketCollector
      Pre collection callback.
      Specified by:
      preCollection in class BucketCollector
      Throws:
      java.io.IOException
    • postCollection

      public void postCollection() throws java.io.IOException
      Description copied from class: BucketCollector
      Post-collection callback.
      Specified by:
      postCollection in class BucketCollector
      Throws:
      java.io.IOException
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • subAggregators

      public Aggregator[] subAggregators()
      Description copied from class: Aggregator
      Get the aggregators running under this one.
      Specified by:
      subAggregators in class Aggregator
    • unwrap

      public static Aggregator unwrap​(Aggregator agg)