Package org.elasticsearch.search.query
Class CancellableCollector
- java.lang.Object
-
- org.apache.lucene.search.FilterCollector
-
- org.elasticsearch.search.query.CancellableCollector
-
- All Implemented Interfaces:
Collector
public class CancellableCollector extends FilterCollector
Collector that checks if the task it is executed under is cancelled.
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.search.FilterCollector
in
-
-
Constructor Summary
Constructors Constructor Description CancellableCollector(BooleanSupplier cancelled, Collector in)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LeafCollectorgetLeafCollector(LeafReaderContext context)Create a newcollectorto collect the given context.-
Methods inherited from class org.apache.lucene.search.FilterCollector
scoreMode, toString
-
-
-
-
Constructor Detail
-
CancellableCollector
public CancellableCollector(BooleanSupplier cancelled, Collector in)
Constructor- Parameters:
cancelled- supplier of the cancellation flag, the supplier will be called for each segmentin- wrapped collector
-
-
Method Detail
-
getLeafCollector
public LeafCollector getLeafCollector(LeafReaderContext context) throws IOException
Description copied from interface:CollectorCreate a newcollectorto collect the given context.- Specified by:
getLeafCollectorin interfaceCollector- Overrides:
getLeafCollectorin classFilterCollector- Parameters:
context- next atomic reader context- Throws:
IOException
-
-