public class EarlyTerminatingCollector
extends org.apache.lucene.search.Collector
A wrapper Collector that throws EarlyTerminatingCollectorException)
once a specified maximum number of documents are collected.
| Constructor and Description |
|---|
EarlyTerminatingCollector(org.apache.lucene.search.Collector delegate,
int maxDocsToCollect)
Wraps a
Collector, throwing EarlyTerminatingCollectorException
once the specified maximum is reached. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsDocsOutOfOrder()
This collector requires that docs be collected in order, otherwise
the computed number of scanned docs in the resulting
EarlyTerminatingCollectorException will be meaningless. |
void |
collect(int doc) |
void |
setNextReader(org.apache.lucene.index.AtomicReaderContext context) |
void |
setScorer(org.apache.lucene.search.Scorer scorer) |
public EarlyTerminatingCollector(org.apache.lucene.search.Collector delegate,
int maxDocsToCollect)
Wraps a Collector, throwing EarlyTerminatingCollectorException
once the specified maximum is reached.
delegate - - the Collector to wrap.maxDocsToCollect - - the maximum number of documents to Collectpublic boolean acceptsDocsOutOfOrder()
EarlyTerminatingCollectorException will be meaningless.acceptsDocsOutOfOrder in class org.apache.lucene.search.Collectorpublic void collect(int doc)
throws IOException
collect in class org.apache.lucene.search.CollectorIOExceptionpublic void setNextReader(org.apache.lucene.index.AtomicReaderContext context)
throws IOException
setNextReader in class org.apache.lucene.search.CollectorIOExceptionpublic void setScorer(org.apache.lucene.search.Scorer scorer)
throws IOException
setScorer in class org.apache.lucene.search.CollectorIOExceptionCopyright © 2000–2014 The Apache Software Foundation. All rights reserved.