Package org.apache.solr.search
Class EarlyTerminatingCollector
- java.lang.Object
-
- org.apache.lucene.search.FilterCollector
-
- org.apache.solr.search.EarlyTerminatingCollector
-
- All Implemented Interfaces:
org.apache.lucene.search.Collector
public class EarlyTerminatingCollector extends org.apache.lucene.search.FilterCollector
A wrapperCollector
that throwsEarlyTerminatingCollectorException
) once a specified maximum number of documents are collected.
-
-
Constructor Summary
Constructors Constructor Description EarlyTerminatingCollector(org.apache.lucene.search.Collector delegate, int maxDocsToCollect)
Wraps aCollector
, throwingEarlyTerminatingCollectorException
once the specified maximum is reached.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.lucene.search.LeafCollector
getLeafCollector(org.apache.lucene.index.LeafReaderContext context)
-
-
-
Constructor Detail
-
EarlyTerminatingCollector
public EarlyTerminatingCollector(org.apache.lucene.search.Collector delegate, int maxDocsToCollect)
Wraps aCollector
, throwingEarlyTerminatingCollectorException
once the specified maximum is reached.- Parameters:
delegate
- - the Collector to wrap.maxDocsToCollect
- - the maximum number of documents to Collect
-
-
Method Detail
-
getLeafCollector
public org.apache.lucene.search.LeafCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext context) throws IOException
- Specified by:
getLeafCollector
in interfaceorg.apache.lucene.search.Collector
- Overrides:
getLeafCollector
in classorg.apache.lucene.search.FilterCollector
- Throws:
IOException
-
-