DiversifyingNearestChildrenKnnCollectorManager (Lucene 10.5.0 join API)
Description: declaration: package: org.apache.lucene.search.join, class: DiversifyingNearestChildrenKnnCollectorManager

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

  Constructors
  Constructor
  Description
  `DiversifyingNearestChildrenKnnCollectorManager(int k, BitSetProducer parentsFilter, IndexSearcher indexSearcher)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `isOptimistic()`
  `KnnCollector`
  `newCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context)`
  Return a new `DiversifyingNearestChildrenKnnCollector` instance.
  `KnnCollector`
  `newOptimisticCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context, int k)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DiversifyingNearestChildrenKnnCollectorManager

    public DiversifyingNearestChildrenKnnCollectorManager(int k, BitSetProducer parentsFilter, IndexSearcher indexSearcher)
    Constructor
    Parameters:
      `k` - - the number of top k vectors to collect
      `parentsFilter` - Filter identifying the parent documents.

- ## Method Details

  - ### newCollector

    public KnnCollector newCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context) throws IOException
    Return a new `DiversifyingNearestChildrenKnnCollector` instance.
    Specified by:
      `newCollector` in interface `KnnCollectorManager`
    Parameters:
      `visitedLimit` - the maximum number of nodes that the search is allowed to visit
      `context` - the leaf reader context
    Throws:
      `IOException`

  - ### newOptimisticCollector

    public KnnCollector newOptimisticCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context, int k) throws IOException
    Specified by:
      `newOptimisticCollector` in interface `KnnCollectorManager`
    Throws:
      `IOException`

  - ### isOptimistic

    public boolean isOptimistic()
    Specified by:
      `isOptimistic` in interface `KnnCollectorManager`