KnnVectorValues

abstract class KnnVectorValues

This class abstracts addressing of document vector values indexed as KnnFloatVectorField or KnnByteVectorField.

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion
Link copied to clipboard

A DocIdSetIterator that also provides an index() method tracking a distinct ordinal for a vector associated with each doc.

Properties

Link copied to clipboard
abstract val encoding: VectorEncoding

The vector encoding of these values.

Link copied to clipboard

Functions

Link copied to clipboard
abstract fun copy(): KnnVectorValues

Creates a new copy of this KnnVectorValues. This is helpful when you need to access different values at once, to avoid overwriting the underlying vector returned.

Link copied to clipboard
abstract fun dimension(): Int

Return the dimension of the vectors

Link copied to clipboard
open fun getAcceptOrds(acceptDocs: Bits?): Bits?

Returns a Bits accepting docs accepted by the argument and having a vector value

Link copied to clipboard

Create an iterator for this instance.

Link copied to clipboard
open fun ordToDoc(ord: Int): Int

Return the docid of the document indexed with the given vector ordinal. This default implementation returns the argument and is appropriate for dense values implementations where every doc has a single value.

Link copied to clipboard
abstract fun size(): Int

Return the number of vectors for this field.