org.apache.lucene.search.Collectorpublic class BestBucketsDeferringCollector extends DeferringBucketCollector
DeferringBucketCollector that collects all
matches and then is able to replay a given subset of buckets which represent
the survivors from a pruning process performed by the aggregator that owns
this collector.DeferringBucketCollector.WrappedAggregatorNO_OP_COLLECTOR| Constructor | Description |
|---|---|
BestBucketsDeferringCollector(SearchContext context,
boolean isGlobal) |
Sole constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
LeafBucketCollector |
getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx) |
|
boolean |
needsScores() |
|
void |
postCollection() |
Post-collection callback.
|
void |
preCollection() |
Pre collection callback.
|
void |
prepareSelectedBuckets(long... selectedBuckets) |
Replay the wrapped collector, but only on a selection of buckets.
|
void |
setDeferredCollector(java.lang.Iterable<BucketCollector> deferredCollectors) |
Set the deferred collectors.
|
Aggregator |
wrap(Aggregator in) |
Wrap the provided aggregator so that it behaves (almost) as if it had
been collected directly.
|
wrapreplaypublic BestBucketsDeferringCollector(SearchContext context, boolean isGlobal)
context - The search contextisGlobal - Whether this collector visits all documents (global context)public boolean needsScores()
public void setDeferredCollector(java.lang.Iterable<BucketCollector> deferredCollectors)
setDeferredCollector in class DeferringBucketCollectorpublic LeafBucketCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx) throws java.io.IOException
getLeafCollector in interface org.apache.lucene.search.CollectorgetLeafCollector in class BucketCollectorjava.io.IOExceptionpublic void preCollection()
throws java.io.IOException
BucketCollectorpreCollection in class BucketCollectorjava.io.IOExceptionpublic void postCollection()
throws java.io.IOException
BucketCollectorpostCollection in class BucketCollectorjava.io.IOExceptionpublic void prepareSelectedBuckets(long... selectedBuckets)
throws java.io.IOException
prepareSelectedBuckets in class DeferringBucketCollectorjava.io.IOExceptionpublic Aggregator wrap(Aggregator in)
wrap in class DeferringBucketCollector