Package org.apache.lucene.search.join
Class DiversifyingNearestChildrenKnnCollectorManager
java.lang.Object
org.apache.lucene.search.join.DiversifyingNearestChildrenKnnCollectorManager
- All Implemented Interfaces:
KnnCollectorManager
public class DiversifyingNearestChildrenKnnCollectorManager
extends Object
implements KnnCollectorManager
DiversifyingNearestChildrenKnnCollectorManager responsible for creating
DiversifyingNearestChildrenKnnCollector instances.-
Constructor Summary
ConstructorsConstructorDescriptionDiversifyingNearestChildrenKnnCollectorManager(int k, BitSetProducer parentsFilter, IndexSearcher indexSearcher) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleannewCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context) Return a newDiversifyingNearestChildrenKnnCollectorinstance.newOptimisticCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context, int k)
-
Constructor Details
-
DiversifyingNearestChildrenKnnCollectorManager
public DiversifyingNearestChildrenKnnCollectorManager(int k, BitSetProducer parentsFilter, IndexSearcher indexSearcher) Constructor- Parameters:
k- - the number of top k vectors to collectparentsFilter- Filter identifying the parent documents.
-
-
Method Details
-
newCollector
public KnnCollector newCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context) throws IOException Return a newDiversifyingNearestChildrenKnnCollectorinstance.- Specified by:
newCollectorin interfaceKnnCollectorManager- Parameters:
visitedLimit- the maximum number of nodes that the search is allowed to visitcontext- the leaf reader context- Throws:
IOException
-
newOptimisticCollector
public KnnCollector newOptimisticCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context, int k) throws IOException - Specified by:
newOptimisticCollectorin interfaceKnnCollectorManager- Throws:
IOException
-
isOptimistic
public boolean isOptimistic()- Specified by:
isOptimisticin interfaceKnnCollectorManager
-