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
AKnnCollectorManager
that 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 QueryTimeout
getQueryTimeout()
Get the configuredQueryTimeout
for terminating graph and exact searches.KnnCollector
newCollector(int visitedLimit, LeafReaderContext context)
Return a newKnnCollector
instance.
-
-
-
Constructor Detail
-
TimeLimitingKnnCollectorManager
public TimeLimitingKnnCollectorManager(KnnCollectorManager delegate, QueryTimeout timeout)
-
-
Method Detail
-
getQueryTimeout
public QueryTimeout getQueryTimeout()
Get the configuredQueryTimeout
for terminating graph and exact searches.
-
newCollector
public KnnCollector newCollector(int visitedLimit, LeafReaderContext context) throws IOException
Description copied from interface:KnnCollectorManager
Return a newKnnCollector
instance.- Specified by:
newCollector
in interfaceKnnCollectorManager
- Parameters:
visitedLimit
- the maximum number of nodes that the search is allowed to visitcontext
- the leaf reader context- Throws:
IOException
-
-