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.Parser, Aggregator.SubAggCollectionMode
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.search.aggregations.BucketCollector
NO_OP_COLLECTOR
-
-
Constructor Summary
Constructors Constructor Description ProfilingAggregator(Aggregator delegate, AggregationProfiler profiler)
-
Method Summary
Modifier and Type Method Description InternalAggregation
buildAggregation(long bucket)
Build an aggregation for data that has been collected intobucket
.InternalAggregation
buildEmptyAggregation()
Build an empty aggregation.void
close()
SearchContext
context()
Return theSearchContext
attached with thisAggregator
.LeafBucketCollector
getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx)
java.lang.String
name()
Return the name of this aggregator.boolean
needsScores()
Aggregator
parent()
Return the parent aggregator.void
postCollection()
Post-collection callback.void
preCollection()
Pre collection callback.Aggregator
subAggregator(java.lang.String name)
Return the sub aggregator with the provided name.java.lang.String
toString()
static Aggregator
unwrap(Aggregator agg)
-
Methods inherited from class org.elasticsearch.search.aggregations.Aggregator
descendsFromBucketAggregator
-
-
-
-
Constructor Detail
-
ProfilingAggregator
public ProfilingAggregator(Aggregator delegate, AggregationProfiler profiler) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
close
public void close()
-
needsScores
public boolean needsScores()
-
name
public java.lang.String name()
Description copied from class:Aggregator
Return the name of this aggregator.- Specified by:
name
in classAggregator
-
context
public SearchContext context()
Description copied from class:Aggregator
Return theSearchContext
attached with thisAggregator
.- Specified by:
context
in classAggregator
-
parent
public Aggregator parent()
Description copied from class:Aggregator
Return the parent aggregator.- Specified by:
parent
in classAggregator
-
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 classAggregator
-
buildAggregation
public InternalAggregation buildAggregation(long bucket) throws java.io.IOException
Description copied from class:Aggregator
Build an aggregation for data that has been collected intobucket
.- Specified by:
buildAggregation
in classAggregator
- Throws:
java.io.IOException
-
buildEmptyAggregation
public InternalAggregation buildEmptyAggregation()
Description copied from class:Aggregator
Build an empty aggregation.- Specified by:
buildEmptyAggregation
in classAggregator
-
getLeafCollector
public LeafBucketCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx) throws java.io.IOException
- Specified by:
getLeafCollector
in interfaceorg.apache.lucene.search.Collector
- Specified by:
getLeafCollector
in classBucketCollector
- Throws:
java.io.IOException
-
preCollection
public void preCollection() throws java.io.IOException
Description copied from class:BucketCollector
Pre collection callback.- Specified by:
preCollection
in classBucketCollector
- Throws:
java.io.IOException
-
postCollection
public void postCollection() throws java.io.IOException
Description copied from class:BucketCollector
Post-collection callback.- Specified by:
postCollection
in classBucketCollector
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
unwrap
public static Aggregator unwrap(Aggregator agg)
-
-