org.apache.lucene.search.Collector
public 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.WrappedAggregator
NO_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.
|
wrap
replay
public 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 DeferringBucketCollector
public LeafBucketCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx) throws java.io.IOException
getLeafCollector
in interface org.apache.lucene.search.Collector
getLeafCollector
in class BucketCollector
java.io.IOException
public void preCollection() throws java.io.IOException
BucketCollector
preCollection
in class BucketCollector
java.io.IOException
public void postCollection() throws java.io.IOException
BucketCollector
postCollection
in class BucketCollector
java.io.IOException
public void prepareSelectedBuckets(long... selectedBuckets) throws java.io.IOException
prepareSelectedBuckets
in class DeferringBucketCollector
java.io.IOException
public Aggregator wrap(Aggregator in)
wrap
in class DeferringBucketCollector