public class EarlyTerminatingCollector extends FilterCollector
A wrapper Collector
that throws EarlyTerminatingCollectorException
)
once a specified maximum number of documents are collected.
in
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 |
---|---|
LeafCollector |
getLeafCollector(LeafReaderContext context) |
scoreMode, toString
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 LeafCollector getLeafCollector(LeafReaderContext context) throws IOException
getLeafCollector
in interface Collector
getLeafCollector
in class FilterCollector
IOException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.