GraphBuilderKnnCollector

A restricted, specialized knnCollector that can be used when building a graph.

Does not support TopDocs

Constructors

Link copied to clipboard
constructor(k: Int)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard
open override fun collect(docId: Int, similarity: Float): Boolean

Collect the provided docId and include in the result set.

Link copied to clipboard
open override fun earlyTerminated(): Boolean

If search visits too many documents, the results collector will terminate early. Usually, this is due to some restricted filter on the document set.

Link copied to clipboard
open override fun incVisitedCount(count: Int)
Link copied to clipboard
open override fun k(): Int
Link copied to clipboard
open override fun minCompetitiveSimilarity(): Float

This method is utilized during search to ensure only competitive results are explored.

Link copied to clipboard
Link copied to clipboard
fun popNode(): Int
Link copied to clipboard
Link copied to clipboard
fun size(): Int
Link copied to clipboard
open override fun topDocs(): TopDocs

This drains the collected nearest kNN results and returns them in a new TopDocs collection, ordered by score descending. NOTE: This is generally a destructive action and the collector should not be used after topDocs() is called.

Link copied to clipboard
open override fun visitedCount(): Long
Link copied to clipboard
open override fun visitLimit(): Long