# Uses of Class
org.apache.lucene.index.KnnVectorValues

Packages that use KnnVectorValues
Package
Description
org.apache.lucene.codecs.hnsw
HNSW vector helper classes.
org.apache.lucene.codecs.lucene95
Lucene 9.5 file format.
org.apache.lucene.codecs.lucene99
Lucene 9.9 file format.
org.apache.lucene.index
Code to maintain and access indices.
org.apache.lucene.util.hnsw
Navigable Small-World graph, nominally Hierarchical but currently only has a single layer.
org.apache.lucene.util.quantization
Provides quantization methods for scaling vector values to smaller data types and possibly fewer dimensions

## Uses of KnnVectorValues in org.apache.lucene.codecs.hnsw

Methods in org.apache.lucene.codecs.hnsw with parameters of type KnnVectorValues
Modifier and Type
Method
Description
`RandomVectorScorer`
DefaultFlatVectorScorer.`getRandomVectorScorer(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, byte[] target)`
`RandomVectorScorer`
DefaultFlatVectorScorer.`getRandomVectorScorer(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, float[] target)`
`RandomVectorScorer`
FlatVectorsScorer.`getRandomVectorScorer(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, byte[] target)`
Returns a `RandomVectorScorer` for the given set of vectors and target vector.
`RandomVectorScorer`
FlatVectorsScorer.`getRandomVectorScorer(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, float[] target)`
Returns a `RandomVectorScorer` for the given set of vectors and target vector.
`RandomVectorScorer`
ScalarQuantizedVectorScorer.`getRandomVectorScorer(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, byte[] target)`
`RandomVectorScorer`
ScalarQuantizedVectorScorer.`getRandomVectorScorer(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, float[] target)`
`RandomVectorScorerSupplier`
DefaultFlatVectorScorer.`getRandomVectorScorerSupplier(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues)`
`RandomVectorScorerSupplier`
FlatVectorsScorer.`getRandomVectorScorerSupplier(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues)`
Returns a `RandomVectorScorerSupplier` that can be used to score vectors
`RandomVectorScorerSupplier`
ScalarQuantizedVectorScorer.`getRandomVectorScorerSupplier(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues)`

## Uses of KnnVectorValues in org.apache.lucene.codecs.lucene95

Subclasses of KnnVectorValues in org.apache.lucene.codecs.lucene95
Modifier and Type
Class
Description
`class`
`OffHeapByteVectorValues`
Read the vector values from the index input.
`static class`
`OffHeapByteVectorValues.DenseOffHeapVectorValues`
Dense vector values that are stored off-heap.
`class`
`OffHeapFloatVectorValues`
Read the vector values from the index input.
`static class`
`OffHeapFloatVectorValues.DenseOffHeapVectorValues`
Dense vector values that are stored off-heap.

## Uses of KnnVectorValues in org.apache.lucene.codecs.lucene99

Subclasses of KnnVectorValues in org.apache.lucene.codecs.lucene99
Modifier and Type
Class
Description
`class`
`OffHeapQuantizedByteVectorValues`
Read the quantized vector values and their score correction values from the index input.
`static class`
`OffHeapQuantizedByteVectorValues.DenseOffHeapVectorValues`
Dense vector values that are stored off-heap.
Methods in org.apache.lucene.codecs.lucene99 with parameters of type KnnVectorValues
Modifier and Type
Method
Description
`RandomVectorScorer`
Lucene99ScalarQuantizedVectorScorer.`getRandomVectorScorer(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, byte[] target)`
`RandomVectorScorer`
Lucene99ScalarQuantizedVectorScorer.`getRandomVectorScorer(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, float[] target)`
`RandomVectorScorerSupplier`
Lucene99ScalarQuantizedVectorScorer.`getRandomVectorScorerSupplier(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues)`

## Uses of KnnVectorValues in org.apache.lucene.index

Subclasses of KnnVectorValues in org.apache.lucene.index
Modifier and Type
Class
Description
`class`
`ByteVectorValues`
This class provides access to per-document floating point vector values indexed as `KnnByteVectorField`.
`class`
`FloatVectorValues`
This class provides access to per-document floating point vector values indexed as `KnnFloatVectorField`.
Methods in org.apache.lucene.index that return KnnVectorValues
Modifier and Type
Method
Description
`abstract KnnVectorValues`
KnnVectorValues.`copy()`
Creates a new copy of this `KnnVectorValues`.
Methods in org.apache.lucene.index with parameters of type KnnVectorValues
Modifier and Type
Method
Description
`static org.apache.lucene.index.SortingCodecReader.SortingIteratorSupplier`
SortingCodecReader.`iteratorSupplier(KnnVectorValues values, Sorter.DocMap docMap)`
Creates a factory for SortingValuesIterator.

## Uses of KnnVectorValues in org.apache.lucene.util.hnsw

Methods in org.apache.lucene.util.hnsw with parameters of type KnnVectorValues
Modifier and Type
Method
Description
`protected HnswBuilder`
ConcurrentHnswMerger.`createBuilder(KnnVectorValues mergedVectorValues, int maxOrd)`
`protected HnswBuilder`
IncrementalHnswGraphMerger.`createBuilder(KnnVectorValues mergedVectorValues, int maxOrd)`
Builds a new HnswGraphBuilder using the biggest graph from the merge state as a starting point.
`protected final int[]`
IncrementalHnswGraphMerger.`getNewOrdMapping(KnnVectorValues mergedVectorValues, BitSet initializedNodes)`
Creates a new mapping from old ordinals to new ordinals and returns the total number of vectors in the newly merged segment.
`OnHeapHnswGraph`
HnswGraphMerger.`merge(KnnVectorValues mergedVectorValues, InfoStream infoStream, int maxOrd)`
Merge and produce the on heap graph
`OnHeapHnswGraph`
IncrementalHnswGraphMerger.`merge(KnnVectorValues mergedVectorValues, InfoStream infoStream, int maxOrd)`
Constructors in org.apache.lucene.util.hnsw with parameters of type KnnVectorValues
Modifier
Constructor
Description
``
`AbstractRandomVectorScorer(KnnVectorValues values)`
Creates a new scorer for the given vector values.

## Uses of KnnVectorValues in org.apache.lucene.util.quantization

Subclasses of KnnVectorValues in org.apache.lucene.util.quantization
Modifier and Type
Class
Description
`class`
`QuantizedByteVectorValues`
A version of `ByteVectorValues`, but additionally retrieving score correction offset for Scalar quantization scores.