Class ProfilingAggregator
java.lang.Object
org.elasticsearch.search.aggregations.BucketCollector
org.elasticsearch.search.aggregations.Aggregator
org.elasticsearch.search.profile.aggregation.ProfilingAggregator
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.lucene.search.Collector,Releasable
public class ProfilingAggregator extends Aggregator
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.Aggregator
Aggregator.BucketComparator, Aggregator.Parser, Aggregator.SubAggCollectionMode -
Field Summary
-
Constructor Summary
Constructors Constructor Description ProfilingAggregator(Aggregator delegate, AggregationProfiler profiler) -
Method Summary
Modifier and Type Method Description Aggregator.BucketComparatorbucketComparator(java.lang.String key, SortOrder order)Builds a comparator that compares two buckets aggregated by this Aggregator.InternalAggregation[]buildAggregations(long[] owningBucketOrds)Build the results of this aggregation.InternalAggregationbuildEmptyAggregation()Build an empty aggregation.voidclose()SearchContextcontext()Return theSearchContextattached with thisAggregator.LeafBucketCollectorgetLeafCollector(org.apache.lucene.index.LeafReaderContext ctx)java.lang.Stringname()Return the name of this aggregator.Aggregatorparent()Return the parent aggregator.voidpostCollection()Post-collection callback.voidpreCollection()Pre collection callback.AggregatorresolveSortPath(AggregationPath.PathElement next, java.util.Iterator<AggregationPath.PathElement> path)Resolve a sort path to the target.org.apache.lucene.search.ScoreModescoreMode()AggregatorsubAggregator(java.lang.String name)Return the sub aggregator with the provided name.java.lang.StringtoString()static Aggregatorunwrap(Aggregator agg)Methods inherited from class org.elasticsearch.search.aggregations.Aggregator
buildTopLevel, collectDebugInfo, resolveSortPathOnValidAgg
-
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:AggregatorReturn the name of this aggregator.- Specified by:
namein classAggregator
-
context
Description copied from class:AggregatorReturn theSearchContextattached with thisAggregator.- Specified by:
contextin classAggregator
-
parent
Description copied from class:AggregatorReturn the parent aggregator.- Specified by:
parentin classAggregator
-
subAggregator
Description copied from class:AggregatorReturn the sub aggregator with the provided name.- Specified by:
subAggregatorin classAggregator
-
resolveSortPath
public Aggregator resolveSortPath(AggregationPath.PathElement next, java.util.Iterator<AggregationPath.PathElement> path)Description copied from class:AggregatorResolve a sort path to the target.The default implementation throws an exception but we override it on aggregations that support sorting.
- Overrides:
resolveSortPathin classAggregator
-
bucketComparator
Description copied from class:AggregatorBuilds 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:
bucketComparatorin classAggregator
-
buildAggregations
Description copied from class:AggregatorBuild the results of this aggregation.- Specified by:
buildAggregationsin classAggregator- 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
Description copied from class:AggregatorBuild an empty aggregation.- Specified by:
buildEmptyAggregationin classAggregator
-
getLeafCollector
public LeafBucketCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx) throws java.io.IOException- Specified by:
getLeafCollectorin interfaceorg.apache.lucene.search.Collector- Specified by:
getLeafCollectorin classBucketCollector- Throws:
java.io.IOException
-
preCollection
public void preCollection() throws java.io.IOExceptionDescription copied from class:BucketCollectorPre collection callback.- Specified by:
preCollectionin classBucketCollector- Throws:
java.io.IOException
-
postCollection
public void postCollection() throws java.io.IOExceptionDescription copied from class:BucketCollectorPost-collection callback.- Specified by:
postCollectionin classBucketCollector- Throws:
java.io.IOException
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
unwrap
-