public class EarlyTerminatingCollector extends Collector
A wrapper Collector that throws EarlyTerminatingCollectorException)
once a specified maximum number of documents are collected.
| Constructor and Description |
|---|
EarlyTerminatingCollector(Collector delegate,
int maxDocsToCollect)
Wraps a
Collector, throwing EarlyTerminatingCollectorException
once the specified maximum is reached. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsDocsOutOfOrder() |
void |
collect(int doc) |
int |
getLastDocId() |
int |
getNumCollected() |
void |
setLastDocId(int lastDocId) |
void |
setNextReader(AtomicReaderContext context) |
void |
setNumCollected(int numCollected) |
void |
setScorer(Scorer scorer) |
public EarlyTerminatingCollector(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()
acceptsDocsOutOfOrder in class Collectorpublic void collect(int doc)
throws IOException
collect in class CollectorIOExceptionpublic void setNextReader(AtomicReaderContext context) throws IOException
setNextReader in class CollectorIOExceptionpublic void setScorer(Scorer scorer) throws IOException
setScorer in class CollectorIOExceptionpublic int getNumCollected()
public void setNumCollected(int numCollected)
public int getLastDocId()
public void setLastDocId(int lastDocId)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.