Package org.apache.lucene.search
Class TimeLimitingKnnCollectorManager
java.lang.Object
org.apache.lucene.search.TimeLimitingKnnCollectorManager
- All Implemented Interfaces:
KnnCollectorManager
A
KnnCollectorManager that collects results with a timeout.-
Constructor Summary
ConstructorsConstructorDescriptionTimeLimitingKnnCollectorManager(KnnCollectorManager delegate, QueryTimeout timeout) -
Method Summary
Modifier and TypeMethodDescriptionGet the configuredQueryTimeoutfor terminating graph and exact searches.newCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context) Return a newKnnCollectorinstance.
-
Constructor Details
-
TimeLimitingKnnCollectorManager
-
-
Method Details
-
getQueryTimeout
Get the configuredQueryTimeoutfor terminating graph and exact searches. -
newCollector
public KnnCollector newCollector(int visitedLimit, KnnSearchStrategy searchStrategy, 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 visitsearchStrategy- the optional search strategy configurationcontext- the leaf reader context- Throws:
IOException
-