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 creating `TopKnnCollector` instances. When concurrency is supported, the `BlockingFloatHeap` 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
    --- | --- | ---
    `TopKnnCollector` | `newCollector​(int visitedLimit, LeafReaderContext context)` | Return a new `TopKnnCollector` instance.

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

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

- - ### Constructor Detail

    - #### TopKnnCollectorManager

          public TopKnnCollectorManager​(int k,
                                        IndexSearcher indexSearcher)

  - ### Method Detail

    - #### newCollector

          public TopKnnCollector newCollector​(int visitedLimit,
                                              LeafReaderContext context)
                                       throws IOException

      Return a new `TopKnnCollector` 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`