Package org.apache.lucene.search
Class TimeLimitingKnnCollectorManager
- java.lang.Object
-
- org.apache.lucene.search.TimeLimitingKnnCollectorManager
-
- All Implemented Interfaces:
KnnCollectorManager
public class TimeLimitingKnnCollectorManager extends Object implements KnnCollectorManager
AKnnCollectorManagerthat collects results with a timeout.
-
-
Constructor Summary
Constructors Constructor Description TimeLimitingKnnCollectorManager(KnnCollectorManager delegate, QueryTimeout timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryTimeoutgetQueryTimeout()Get the configuredQueryTimeoutfor terminating graph and exact searches.KnnCollectornewCollector(int visitedLimit, LeafReaderContext context)Return a newKnnCollectorinstance.
-
-
-
Constructor Detail
-
TimeLimitingKnnCollectorManager
public TimeLimitingKnnCollectorManager(KnnCollectorManager delegate, QueryTimeout timeout)
-
-
Method Detail
-
getQueryTimeout
public QueryTimeout getQueryTimeout()
Get the configuredQueryTimeoutfor terminating graph and exact searches.
-
newCollector
public KnnCollector newCollector(int visitedLimit, LeafReaderContext context) throws IOException
Description copied from interface:KnnCollectorManagerReturn a newKnnCollectorinstance.- Specified by:
newCollectorin interfaceKnnCollectorManager- Parameters:
visitedLimit- the maximum number of nodes that the search is allowed to visitcontext- the leaf reader context- Throws:
IOException
-
-