public class CancellableCollector
extends org.apache.lucene.search.FilterCollector
Constructor and Description |
---|
CancellableCollector(Provider<java.lang.Boolean> cancelled,
boolean lowLevelCancellation,
org.apache.lucene.search.Collector in)
Constructor
|
Modifier and Type | Method and Description |
---|---|
org.apache.lucene.search.LeafCollector |
getLeafCollector(org.apache.lucene.index.LeafReaderContext context) |
public CancellableCollector(Provider<java.lang.Boolean> cancelled, boolean lowLevelCancellation, org.apache.lucene.search.Collector in)
cancelled
- supplier of the cancellation flag, the supplier will be called for each segment if lowLevelCancellation is set
to false and for each collected record if lowLevelCancellation is set to true. In other words this class assumes
that the supplier is fast, with performance on the order of a volatile read.lowLevelCancellation
- true if collector should check for cancellation for each collected record, false if check should be
performed only once per segmentin
- wrapped collectorpublic org.apache.lucene.search.LeafCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext context) throws java.io.IOException
getLeafCollector
in interface org.apache.lucene.search.Collector
getLeafCollector
in class org.apache.lucene.search.FilterCollector
java.io.IOException