public class EarlyTerminatingCollector
extends org.apache.lucene.search.FilterCollector
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 |
---|---|
org.apache.lucene.search.LeafCollector |
getLeafCollector(org.apache.lucene.index.LeafReaderContext context) |
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 org.apache.lucene.search.LeafCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext context) throws IOException
getLeafCollector
in interface org.apache.lucene.search.Collector
getLeafCollector
in class org.apache.lucene.search.FilterCollector
IOException
Copyright © 2000–2015 The Apache Software Foundation. All rights reserved.