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.FilterCollectorA wrapperCollectorthat 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, throwingEarlyTerminatingCollectorExceptiononce the specified maximum is reached.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.lucene.search.LeafCollectorgetLeafCollector(org.apache.lucene.index.LeafReaderContext context)
-
-
-
Constructor Detail
-
EarlyTerminatingCollector
public EarlyTerminatingCollector(org.apache.lucene.search.Collector delegate, int maxDocsToCollect)Wraps aCollector, throwingEarlyTerminatingCollectorExceptiononce 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:
getLeafCollectorin interfaceorg.apache.lucene.search.Collector- Overrides:
getLeafCollectorin classorg.apache.lucene.search.FilterCollector- Throws:
IOException
-
-