Class DeferringBucketCollector.WrappedAggregator
java.lang.Object
org.elasticsearch.search.aggregations.BucketCollector
org.elasticsearch.search.aggregations.Aggregator
org.elasticsearch.search.aggregations.bucket.DeferringBucketCollector.WrappedAggregator
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,org.apache.lucene.search.Collector
,Releasable
- Enclosing class:
- DeferringBucketCollector
protected class DeferringBucketCollector.WrappedAggregator extends Aggregator
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.Aggregator
Aggregator.BucketComparator, Aggregator.Parser, Aggregator.SubAggCollectionMode
-
Field Summary
-
Method Summary
Modifier and Type Method Description Aggregator.BucketComparator
bucketComparator(java.lang.String key, SortOrder order)
Builds a comparator that compares two buckets aggregated by this Aggregator.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.Aggregator
parent()
Return the parent aggregator.void
postCollection()
Post-collection callback.void
preCollection()
Pre collection callback.Aggregator
resolveSortPath(AggregationPath.PathElement next, java.util.Iterator<AggregationPath.PathElement> path)
Resolve a sort path to the target.org.apache.lucene.search.ScoreMode
scoreMode()
Aggregator
subAggregator(java.lang.String name)
Return the sub aggregator with the provided name.Methods inherited from class org.elasticsearch.search.aggregations.Aggregator
descendsFromBucketAggregator, resolveSortPathOnValidAgg
-
Method Details
-
scoreMode
public org.apache.lucene.search.ScoreMode scoreMode() -
close
public void close() -
name
public java.lang.String name()Description copied from class:Aggregator
Return the name of this aggregator.- Specified by:
name
in classAggregator
-
parent
Description copied from class:Aggregator
Return the parent aggregator.- Specified by:
parent
in classAggregator
-
context
Description copied from class:Aggregator
Return theSearchContext
attached with thisAggregator
.- Specified by:
context
in classAggregator
-
subAggregator
Description copied from class:Aggregator
Return the sub aggregator with the provided name.- Specified by:
subAggregator
in classAggregator
-
buildAggregation
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
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.IOExceptionDescription copied from class:BucketCollector
Pre collection callback.- Specified by:
preCollection
in classBucketCollector
- Throws:
java.io.IOException
-
postCollection
public void postCollection() throws java.io.IOExceptionDescription copied from class:BucketCollector
Post-collection callback.- Specified by:
postCollection
in classBucketCollector
- Throws:
java.io.IOException
-
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 classAggregator
-
bucketComparator
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 classAggregator
-