Class DeferringBucketCollector
java.lang.Object
org.elasticsearch.search.aggregations.BucketCollector
org.elasticsearch.search.aggregations.bucket.DeferringBucketCollector
- All Implemented Interfaces:
org.apache.lucene.search.Collector
- Direct Known Subclasses:
BestBucketsDeferringCollector,BestDocsDeferringCollector
public abstract class DeferringBucketCollector extends BucketCollector
A
BucketCollector that records collected doc IDs and buckets and
allows to replay a subset of the collected buckets.-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classDeferringBucketCollector.WrappedAggregator -
Field Summary
Fields inherited from class org.elasticsearch.search.aggregations.BucketCollector
NO_OP_COLLECTOR -
Constructor Summary
Constructors Constructor Description DeferringBucketCollector()Sole constructor. -
Method Summary
Modifier and Type Method Description abstract voidprepareSelectedBuckets(long... selectedBuckets)Replay the deferred hits on the selected buckets.abstract voidsetDeferredCollector(java.lang.Iterable<BucketCollector> deferredCollectors)Set the deferred collectors.Aggregatorwrap(Aggregator in)Wrap the provided aggregator so that it behaves (almost) as if it had been collected directly.Methods inherited from class org.elasticsearch.search.aggregations.BucketCollector
getLeafCollector, postCollection, preCollectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.search.Collector
scoreMode
-
Constructor Details
-
DeferringBucketCollector
public DeferringBucketCollector()Sole constructor.
-
-
Method Details
-
setDeferredCollector
Set the deferred collectors. -
prepareSelectedBuckets
public abstract void prepareSelectedBuckets(long... selectedBuckets) throws java.io.IOExceptionReplay the deferred hits on the selected buckets.- Throws:
java.io.IOException
-
wrap
Wrap the provided aggregator so that it behaves (almost) as if it had been collected directly.
-