Package org.apache.lucene.search.knn
Class TopKnnCollectorManager
- java.lang.Object
-
- org.apache.lucene.search.knn.TopKnnCollectorManager
-
- All Implemented Interfaces:
KnnCollectorManager
public class TopKnnCollectorManager extends Object implements KnnCollectorManager
TopKnnCollectorManager responsible for creatingTopKnnCollector
instances. When concurrency is supported, theBlockingFloatHeap
is used to track the global top scores collected across all leaves.
-
-
Constructor Summary
Constructors Constructor Description TopKnnCollectorManager(int k, IndexSearcher indexSearcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KnnCollector
newCollector(int visitedLimit, LeafReaderContext context)
Return a newTopKnnCollector
instance.
-
-
-
Constructor Detail
-
TopKnnCollectorManager
public TopKnnCollectorManager(int k, IndexSearcher indexSearcher)
-
-
Method Detail
-
newCollector
public KnnCollector newCollector(int visitedLimit, LeafReaderContext context) throws IOException
Return a newTopKnnCollector
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
-
-