DenseOffHeapVectorValues

class DenseOffHeapVectorValues(dimension: Int, size: Int, scalarQuantizer: ScalarQuantizer, compress: Boolean, similarityFunction: VectorSimilarityFunction, vectorsScorer: FlatVectorsScorer, slice: IndexInput) : OffHeapQuantizedByteVectorValues

Dense vector values that are stored off-heap. This is the most common case when every doc has a vector.

Constructors

Link copied to clipboard
constructor(dimension: Int, size: Int, scalarQuantizer: ScalarQuantizer, compress: Boolean, similarityFunction: VectorSimilarityFunction, vectorsScorer: FlatVectorsScorer, slice: IndexInput)

Properties

Link copied to clipboard
open override val encoding: VectorEncoding

The vector encoding of these values.

Link copied to clipboard
open override val scalarQuantizer: ScalarQuantizer
Link copied to clipboard
open override val slice: IndexInput?

Returns an IndexInput from which to read this instance's values.

Link copied to clipboard
open override val vectorByteLength: Int

Functions

Link copied to clipboard

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
open override fun dimension(): Int

Return the dimension of the vectors

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

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

Link copied to clipboard
open override fun getScoreCorrectionConstant(ord: Int): Float
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
open override fun scorer(query: FloatArray): VectorScorer
open fun scorer(query: ByteArray): VectorScorer?

Return a VectorScorer for the given query vector.

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

Return the number of vectors for this field.

Link copied to clipboard
open override fun vectorValue(targetOrd: Int): ByteArray

Return the vector value for the given vector ordinal which must be in 0, size() - 1, otherwise IndexOutOfBoundsException is thrown. The returned array may be shared across calls.