Uses of Enum Class
org.apache.lucene.index.VectorSimilarityFunction
Packages that use VectorSimilarityFunction
Package
Description
Analysis components for Synonyms using Word2Vec model.
Lucene 9.0 file format.
Lucene 9.1 file format.
Lucene 9.2 file format.
Lucene 9.4 file format.
Lucene 9.5 file format.
A simple bit-vector format that supports hamming distance and storing vectors in an HNSW graph
HNSW vector helper classes.
Lucene 9.4 file format.
Lucene 9.5 file format.
Lucene 9.9 file format.
Simpletext Codec: writes human readable postings.
The logical representation of a
Document
for indexing and
searching.Code to maintain and access indices.
A variety of functions to use with FunctionQuery.
This package implements KMeans algorithm for clustering vectors
Provides quantization methods for scaling vector values to smaller data types and possibly fewer
dimensions
-
Uses of VectorSimilarityFunction in org.apache.lucene.analysis.synonym.word2vec
Fields in org.apache.lucene.analysis.synonym.word2vec declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprivate static final VectorSimilarityFunction
Word2VecSynonymProvider.SIMILARITY_FUNCTION
-
Uses of VectorSimilarityFunction in org.apache.lucene.backward_codecs.lucene90
Fields in org.apache.lucene.backward_codecs.lucene90 declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprivate final VectorSimilarityFunction
Lucene90HnswGraphBuilder.similarityFunction
private final VectorSimilarityFunction
Lucene90HnswVectorsReader.FieldEntry.similarityFunction
The field for thesimilarityFunction
record component.(package private) final VectorSimilarityFunction
Lucene90HnswVectorsReader.OffHeapFloatVectorValues.similarityFunction
Methods in org.apache.lucene.backward_codecs.lucene90 that return VectorSimilarityFunctionModifier and TypeMethodDescriptionprivate static VectorSimilarityFunction
Lucene90FieldInfosFormat.getDistFunc
(IndexInput input, byte b) private VectorSimilarityFunction
Lucene90HnswVectorsReader.readSimilarityFunction
(DataInput input) Lucene90HnswVectorsReader.FieldEntry.similarityFunction()
Returns the value of thesimilarityFunction
record component.Methods in org.apache.lucene.backward_codecs.lucene90 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static Lucene90HnswVectorsReader.FieldEntry
Lucene90HnswVectorsReader.FieldEntry.create
(DataInput input, VectorSimilarityFunction similarityFunction) static NeighborQueue
Lucene90OnHeapHnswGraph.search
(float[] query, int topK, int numSeed, FloatVectorValues vectors, VectorSimilarityFunction similarityFunction, HnswGraph graphValues, Bits acceptOrds, long visitedLimit, SplittableRandom random) Searches for the nearest neighbors of a query vector.Constructors in org.apache.lucene.backward_codecs.lucene90 with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionprivate
FieldEntry
(VectorSimilarityFunction similarityFunction, long vectorDataOffset, long vectorDataLength, long indexDataOffset, long indexDataLength, int dimension, int[] ordToDoc, long[] ordOffsets) Creates an instance of aFieldEntry
record class.Lucene90HnswGraphBuilder
(FloatVectorValues vectors, VectorSimilarityFunction similarityFunction, int maxConn, int beamWidth, long seed) Reads all the vectors from vector values, builds a graph connecting them by their dense ordinals, using the given hyperparameter settings, and returns the resulting graph.(package private)
OffHeapFloatVectorValues
(int dimension, int[] ordToDoc, VectorSimilarityFunction similarityFunction, IndexInput dataIn) -
Uses of VectorSimilarityFunction in org.apache.lucene.backward_codecs.lucene91
Fields in org.apache.lucene.backward_codecs.lucene91 declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprivate final VectorSimilarityFunction
Lucene91HnswVectorsReader.FieldEntry.similarityFunction
The field for thesimilarityFunction
record component.private final VectorSimilarityFunction
Lucene91HnswVectorsReader.OffHeapFloatVectorValues.similarityFunction
Methods in org.apache.lucene.backward_codecs.lucene91 that return VectorSimilarityFunctionModifier and TypeMethodDescriptionprivate VectorSimilarityFunction
Lucene91HnswVectorsReader.readSimilarityFunction
(DataInput input) Lucene91HnswVectorsReader.FieldEntry.similarityFunction()
Returns the value of thesimilarityFunction
record component.Methods in org.apache.lucene.backward_codecs.lucene91 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static Lucene91HnswVectorsReader.FieldEntry
Lucene91HnswVectorsReader.FieldEntry.create
(DataInput input, VectorSimilarityFunction similarityFunction) Constructors in org.apache.lucene.backward_codecs.lucene91 with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionprivate
FieldEntry
(VectorSimilarityFunction similarityFunction, long vectorDataOffset, long vectorDataLength, long vectorIndexOffset, long vectorIndexLength, int maxConn, int numLevels, int dimension, int size, int[] ordToDoc, IntUnaryOperator ordToDocOperator, int[][] nodesByLevel, long[] graphOffsetsByLevel) Creates an instance of aFieldEntry
record class.(package private)
OffHeapFloatVectorValues
(int dimension, int size, int[] ordToDoc, VectorSimilarityFunction similarityFunction, IndexInput dataIn) -
Uses of VectorSimilarityFunction in org.apache.lucene.backward_codecs.lucene92
Fields in org.apache.lucene.backward_codecs.lucene92 declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprivate final VectorSimilarityFunction
Lucene92HnswVectorsReader.FieldEntry.similarityFunction
The field for thesimilarityFunction
record component.protected final VectorSimilarityFunction
OffHeapFloatVectorValues.vectorSimilarityFunction
Methods in org.apache.lucene.backward_codecs.lucene92 that return VectorSimilarityFunctionModifier and TypeMethodDescriptionprivate VectorSimilarityFunction
Lucene92HnswVectorsReader.readSimilarityFunction
(DataInput input) Lucene92HnswVectorsReader.FieldEntry.similarityFunction()
Returns the value of thesimilarityFunction
record component.Methods in org.apache.lucene.backward_codecs.lucene92 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static Lucene92HnswVectorsReader.FieldEntry
Lucene92HnswVectorsReader.FieldEntry.create
(IndexInput input, VectorSimilarityFunction similarityFunction) Constructors in org.apache.lucene.backward_codecs.lucene92 with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionDenseOffHeapVectorValues
(int dimension, int size, VectorSimilarityFunction vectorSimilarityFunction, IndexInput slice) (package private)
FieldEntry
(VectorSimilarityFunction similarityFunction, long vectorDataOffset, long vectorDataLength, long vectorIndexOffset, long vectorIndexLength, int M, int numLevels, int dimension, int size, int[][] nodesByLevel, long[] graphOffsetsByLevel, long docsWithFieldOffset, long docsWithFieldLength, short jumpTableEntryCount, byte denseRankPower, long addressesOffset, int blockShift, DirectMonotonicReader.Meta meta, long addressesLength) Creates an instance of aFieldEntry
record class.(package private)
OffHeapFloatVectorValues
(int dimension, int size, VectorSimilarityFunction vectorSimilarityFunction, IndexInput slice) SparseOffHeapVectorValues
(Lucene92HnswVectorsReader.FieldEntry fieldEntry, IndexInput dataIn, VectorSimilarityFunction vectorSimilarityFunction, IndexInput slice) -
Uses of VectorSimilarityFunction in org.apache.lucene.backward_codecs.lucene94
Fields in org.apache.lucene.backward_codecs.lucene94 declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprivate final VectorSimilarityFunction
Lucene94HnswVectorsReader.FieldEntry.similarityFunction
The field for thesimilarityFunction
record component.protected final VectorSimilarityFunction
OffHeapByteVectorValues.vectorSimilarityFunction
protected final VectorSimilarityFunction
OffHeapFloatVectorValues.vectorSimilarityFunction
Methods in org.apache.lucene.backward_codecs.lucene94 that return VectorSimilarityFunctionModifier and TypeMethodDescriptionprivate VectorSimilarityFunction
Lucene94HnswVectorsReader.readSimilarityFunction
(DataInput input) Lucene94HnswVectorsReader.FieldEntry.similarityFunction()
Returns the value of thesimilarityFunction
record component.Methods in org.apache.lucene.backward_codecs.lucene94 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static Lucene94HnswVectorsReader.FieldEntry
Lucene94HnswVectorsReader.FieldEntry.create
(IndexInput input, VectorEncoding vectorEncoding, VectorSimilarityFunction similarityFunction) Constructors in org.apache.lucene.backward_codecs.lucene94 with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionDenseOffHeapVectorValues
(int dimension, int size, IndexInput slice, VectorSimilarityFunction vectorSimilarityFunction, int byteSize) DenseOffHeapVectorValues
(int dimension, int size, IndexInput slice, VectorSimilarityFunction vectorSimilarityFunction, int byteSize) (package private)
FieldEntry
(VectorSimilarityFunction similarityFunction, VectorEncoding vectorEncoding, long vectorDataOffset, long vectorDataLength, long vectorIndexOffset, long vectorIndexLength, int M, int numLevels, int dimension, int size, int[][] nodesByLevel, long[] graphOffsetsByLevel, long docsWithFieldOffset, long docsWithFieldLength, short jumpTableEntryCount, byte denseRankPower, long addressesOffset, int blockShift, DirectMonotonicReader.Meta meta, long addressesLength) Creates an instance of aFieldEntry
record class.(package private)
OffHeapByteVectorValues
(int dimension, int size, IndexInput slice, VectorSimilarityFunction vectorSimilarityFunction, int byteSize) (package private)
OffHeapFloatVectorValues
(int dimension, int size, IndexInput slice, VectorSimilarityFunction vectorSimilarityFunction, int byteSize) SparseOffHeapVectorValues
(Lucene94HnswVectorsReader.FieldEntry fieldEntry, IndexInput dataIn, IndexInput slice, VectorSimilarityFunction vectorSimilarityFunction, int byteSize) SparseOffHeapVectorValues
(Lucene94HnswVectorsReader.FieldEntry fieldEntry, IndexInput dataIn, IndexInput slice, VectorSimilarityFunction vectorSimilarityFunction, int byteSize) -
Uses of VectorSimilarityFunction in org.apache.lucene.backward_codecs.lucene95
Fields in org.apache.lucene.backward_codecs.lucene95 declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprivate final VectorSimilarityFunction
Lucene95HnswVectorsReader.FieldEntry.similarityFunction
The field for thesimilarityFunction
record component.Methods in org.apache.lucene.backward_codecs.lucene95 that return VectorSimilarityFunctionModifier and TypeMethodDescriptionprivate VectorSimilarityFunction
Lucene95HnswVectorsReader.readSimilarityFunction
(DataInput input) Lucene95HnswVectorsReader.FieldEntry.similarityFunction()
Returns the value of thesimilarityFunction
record component.Methods in org.apache.lucene.backward_codecs.lucene95 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static Lucene95HnswVectorsReader.FieldEntry
Lucene95HnswVectorsReader.FieldEntry.create
(IndexInput input, VectorEncoding vectorEncoding, VectorSimilarityFunction similarityFunction) Constructors in org.apache.lucene.backward_codecs.lucene95 with parameters of type VectorSimilarityFunctionModifierConstructorDescription(package private)
FieldEntry
(VectorSimilarityFunction similarityFunction, VectorEncoding vectorEncoding, long vectorDataOffset, long vectorDataLength, long vectorIndexOffset, long vectorIndexLength, int M, int numLevels, int dimension, int size, int[][] nodesByLevel, DirectMonotonicReader.Meta offsetsMeta, long offsetsOffset, int offsetsBlockShift, long offsetsLength, OrdToDocDISIReaderConfiguration ordToDocVectorValues) Creates an instance of aFieldEntry
record class. -
Uses of VectorSimilarityFunction in org.apache.lucene.codecs.bitvectors
Methods in org.apache.lucene.codecs.bitvectors with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescriptionFlatBitVectorsScorer.getRandomVectorScorer
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, byte[] target) FlatBitVectorsScorer.getRandomVectorScorer
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, float[] target) FlatBitVectorsScorer.getRandomVectorScorerSupplier
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues) -
Uses of VectorSimilarityFunction in org.apache.lucene.codecs.hnsw
Fields in org.apache.lucene.codecs.hnsw declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprivate final VectorSimilarityFunction
DefaultFlatVectorScorer.ByteScoringSupplier.similarityFunction
private final VectorSimilarityFunction
DefaultFlatVectorScorer.ByteVectorScorer.similarityFunction
private final VectorSimilarityFunction
DefaultFlatVectorScorer.FloatScoringSupplier.similarityFunction
private final VectorSimilarityFunction
DefaultFlatVectorScorer.FloatVectorScorer.similarityFunction
private final VectorSimilarityFunction
ScalarQuantizedVectorScorer.ScalarQuantizedRandomVectorScorerSupplier.vectorSimilarityFunction
Methods in org.apache.lucene.codecs.hnsw with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescriptionDefaultFlatVectorScorer.getRandomVectorScorer
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, byte[] target) DefaultFlatVectorScorer.getRandomVectorScorer
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, float[] target) FlatVectorsScorer.getRandomVectorScorer
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, byte[] target) Returns aRandomVectorScorer
for the given set of vectors and target vector.FlatVectorsScorer.getRandomVectorScorer
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, float[] target) Returns aRandomVectorScorer
for the given set of vectors and target vector.ScalarQuantizedVectorScorer.getRandomVectorScorer
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, byte[] target) ScalarQuantizedVectorScorer.getRandomVectorScorer
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, float[] target) DefaultFlatVectorScorer.getRandomVectorScorerSupplier
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues) FlatVectorsScorer.getRandomVectorScorerSupplier
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues) Returns aRandomVectorScorerSupplier
that can be used to score vectorsScalarQuantizedVectorScorer.getRandomVectorScorerSupplier
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues) static float
ScalarQuantizedVectorScorer.quantizeQuery
(float[] query, byte[] quantizedQuery, VectorSimilarityFunction similarityFunction, ScalarQuantizer scalarQuantizer) Constructors in org.apache.lucene.codecs.hnsw with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionprivate
ByteScoringSupplier
(ByteVectorValues vectors, VectorSimilarityFunction similarityFunction) ByteVectorScorer
(ByteVectorValues values, byte[] query, VectorSimilarityFunction similarityFunction) private
FloatScoringSupplier
(FloatVectorValues vectors, VectorSimilarityFunction similarityFunction) FloatVectorScorer
(FloatVectorValues values, float[] query, VectorSimilarityFunction similarityFunction) ScalarQuantizedRandomVectorScorerSupplier
(VectorSimilarityFunction similarityFunction, ScalarQuantizer scalarQuantizer, QuantizedByteVectorValues values) private
ScalarQuantizedRandomVectorScorerSupplier
(ScalarQuantizedVectorSimilarity similarity, VectorSimilarityFunction vectorSimilarityFunction, QuantizedByteVectorValues values) -
Uses of VectorSimilarityFunction in org.apache.lucene.codecs.lucene94
Fields in org.apache.lucene.codecs.lucene94 with type parameters of type VectorSimilarityFunctionModifier and TypeFieldDescription(package private) static final List
<VectorSimilarityFunction> Lucene94FieldInfosFormat.SIMILARITY_FUNCTIONS
Methods in org.apache.lucene.codecs.lucene94 that return VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static VectorSimilarityFunction
Lucene94FieldInfosFormat.distOrdToFunc
(byte i) private static VectorSimilarityFunction
Lucene94FieldInfosFormat.getDistFunc
(IndexInput input, byte b) Methods in org.apache.lucene.codecs.lucene94 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static byte
Lucene94FieldInfosFormat.distFuncToOrd
(VectorSimilarityFunction func) -
Uses of VectorSimilarityFunction in org.apache.lucene.codecs.lucene95
Fields in org.apache.lucene.codecs.lucene95 declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprotected final VectorSimilarityFunction
OffHeapByteVectorValues.similarityFunction
protected final VectorSimilarityFunction
OffHeapFloatVectorValues.similarityFunction
Methods in org.apache.lucene.codecs.lucene95 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescriptionstatic OffHeapByteVectorValues
OffHeapByteVectorValues.load
(VectorSimilarityFunction vectorSimilarityFunction, FlatVectorsScorer flatVectorsScorer, OrdToDocDISIReaderConfiguration configuration, VectorEncoding vectorEncoding, int dimension, long vectorDataOffset, long vectorDataLength, IndexInput vectorData) static OffHeapFloatVectorValues
OffHeapFloatVectorValues.load
(VectorSimilarityFunction vectorSimilarityFunction, FlatVectorsScorer flatVectorsScorer, OrdToDocDISIReaderConfiguration configuration, VectorEncoding vectorEncoding, int dimension, long vectorDataOffset, long vectorDataLength, IndexInput vectorData) Constructors in org.apache.lucene.codecs.lucene95 with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionDenseOffHeapVectorValues
(int dimension, int size, IndexInput slice, int byteSize, FlatVectorsScorer flatVectorsScorer, VectorSimilarityFunction vectorSimilarityFunction) DenseOffHeapVectorValues
(int dimension, int size, IndexInput slice, int byteSize, FlatVectorsScorer flatVectorsScorer, VectorSimilarityFunction similarityFunction) EmptyOffHeapVectorValues
(int dimension, FlatVectorsScorer flatVectorsScorer, VectorSimilarityFunction vectorSimilarityFunction) EmptyOffHeapVectorValues
(int dimension, FlatVectorsScorer flatVectorsScorer, VectorSimilarityFunction similarityFunction) (package private)
OffHeapByteVectorValues
(int dimension, int size, IndexInput slice, int byteSize, FlatVectorsScorer flatVectorsScorer, VectorSimilarityFunction similarityFunction) (package private)
OffHeapFloatVectorValues
(int dimension, int size, IndexInput slice, int byteSize, FlatVectorsScorer flatVectorsScorer, VectorSimilarityFunction similarityFunction) SparseOffHeapVectorValues
(OrdToDocDISIReaderConfiguration configuration, IndexInput dataIn, IndexInput slice, int dimension, int byteSize, FlatVectorsScorer flatVectorsScorer, VectorSimilarityFunction vectorSimilarityFunction) SparseOffHeapVectorValues
(OrdToDocDISIReaderConfiguration configuration, IndexInput dataIn, IndexInput slice, int dimension, int byteSize, FlatVectorsScorer flatVectorsScorer, VectorSimilarityFunction similarityFunction) -
Uses of VectorSimilarityFunction in org.apache.lucene.codecs.lucene99
Fields in org.apache.lucene.codecs.lucene99 declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprivate final VectorSimilarityFunction
Lucene99FlatVectorsReader.FieldEntry.similarityFunction
The field for thesimilarityFunction
record component.private final VectorSimilarityFunction
Lucene99HnswVectorsReader.FieldEntry.similarityFunction
The field for thesimilarityFunction
record component.private final VectorSimilarityFunction
Lucene99ScalarQuantizedVectorsReader.FieldEntry.similarityFunction
The field for thesimilarityFunction
record component.protected final VectorSimilarityFunction
OffHeapQuantizedByteVectorValues.similarityFunction
private final VectorSimilarityFunction
Lucene99ScalarQuantizedVectorScorer.ScalarQuantizedRandomVectorScorerSupplier.vectorSimilarityFunction
private final VectorSimilarityFunction
Lucene99ScalarQuantizedVectorsWriter.OffsetCorrectedQuantizedByteVectorValues.vectorSimilarityFunction
private final VectorSimilarityFunction
Lucene99ScalarQuantizedVectorsWriter.QuantizedFloatVectorValues.vectorSimilarityFunction
Fields in org.apache.lucene.codecs.lucene99 with type parameters of type VectorSimilarityFunctionModifier and TypeFieldDescriptionstatic final List
<VectorSimilarityFunction> Lucene99HnswVectorsReader.SIMILARITY_FUNCTIONS
Methods in org.apache.lucene.codecs.lucene99 that return VectorSimilarityFunctionModifier and TypeMethodDescriptionstatic VectorSimilarityFunction
Lucene99HnswVectorsReader.readSimilarityFunction
(DataInput input) Lucene99FlatVectorsReader.FieldEntry.similarityFunction()
Returns the value of thesimilarityFunction
record component.Lucene99HnswVectorsReader.FieldEntry.similarityFunction()
Returns the value of thesimilarityFunction
record component.Lucene99ScalarQuantizedVectorsReader.FieldEntry.similarityFunction()
Returns the value of thesimilarityFunction
record component.Methods in org.apache.lucene.codecs.lucene99 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static ScalarQuantizer
Lucene99ScalarQuantizedVectorsWriter.buildScalarQuantizer
(FloatVectorValues floatVectorValues, int numVectors, VectorSimilarityFunction vectorSimilarityFunction, Float confidenceInterval, byte bits) (package private) static Lucene99HnswVectorsReader.FieldEntry
Lucene99HnswVectorsReader.FieldEntry.create
(IndexInput input, VectorEncoding vectorEncoding, VectorSimilarityFunction similarityFunction) (package private) static Lucene99ScalarQuantizedVectorsReader.FieldEntry
Lucene99ScalarQuantizedVectorsReader.FieldEntry.create
(IndexInput input, int versionMeta, VectorEncoding vectorEncoding, VectorSimilarityFunction similarityFunction) (package private) static int
Lucene99HnswVectorsWriter.distFuncToOrd
(VectorSimilarityFunction func) (package private) static RandomVectorScorer
Lucene99ScalarQuantizedVectorScorer.fromVectorSimilarity
(byte[] targetBytes, float offsetCorrection, VectorSimilarityFunction sim, float constMultiplier, QuantizedByteVectorValues values) Lucene99ScalarQuantizedVectorScorer.getRandomVectorScorer
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, byte[] target) Lucene99ScalarQuantizedVectorScorer.getRandomVectorScorer
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, float[] target) Lucene99ScalarQuantizedVectorScorer.getRandomVectorScorerSupplier
(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues) OffHeapQuantizedByteVectorValues.load
(OrdToDocDISIReaderConfiguration configuration, int dimension, int size, ScalarQuantizer scalarQuantizer, VectorSimilarityFunction similarityFunction, FlatVectorsScorer vectorsScorer, boolean compress, long quantizedVectorDataOffset, long quantizedVectorDataLength, IndexInput vectorData) Constructors in org.apache.lucene.codecs.lucene99 with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionDenseOffHeapVectorValues
(int dimension, int size, ScalarQuantizer scalarQuantizer, boolean compress, VectorSimilarityFunction similarityFunction, FlatVectorsScorer vectorsScorer, IndexInput slice) EmptyOffHeapVectorValues
(int dimension, VectorSimilarityFunction similarityFunction, FlatVectorsScorer vectorsScorer) (package private)
FieldEntry
(VectorSimilarityFunction similarityFunction, VectorEncoding vectorEncoding, long vectorDataOffset, long vectorDataLength, int dimension, int size, OrdToDocDISIReaderConfiguration ordToDoc, FieldInfo info) Creates an instance of aFieldEntry
record class.private
FieldEntry
(VectorSimilarityFunction similarityFunction, VectorEncoding vectorEncoding, long vectorIndexOffset, long vectorIndexLength, int M, int numLevels, int dimension, int size, int[][] nodesByLevel, DirectMonotonicReader.Meta offsetsMeta, long offsetsOffset, int offsetsBlockShift, long offsetsLength) Creates an instance of aFieldEntry
record class.private
FieldEntry
(VectorSimilarityFunction similarityFunction, VectorEncoding vectorEncoding, int dimension, long vectorDataOffset, long vectorDataLength, ScalarQuantizer scalarQuantizer, int size, byte bits, boolean compress, OrdToDocDISIReaderConfiguration ordToDoc) Creates an instance of aFieldEntry
record class.(package private)
OffHeapQuantizedByteVectorValues
(int dimension, int size, ScalarQuantizer scalarQuantizer, VectorSimilarityFunction similarityFunction, FlatVectorsScorer vectorsScorer, boolean compress, IndexInput slice) (package private)
OffsetCorrectedQuantizedByteVectorValues
(QuantizedByteVectorValues in, VectorSimilarityFunction vectorSimilarityFunction, ScalarQuantizer scalarQuantizer, ScalarQuantizer oldScalarQuantizer) QuantizedFloatVectorValues
(FloatVectorValues values, VectorSimilarityFunction vectorSimilarityFunction, ScalarQuantizer quantizer) ScalarQuantizedRandomVectorScorerSupplier
(QuantizedByteVectorValues values, VectorSimilarityFunction vectorSimilarityFunction) SparseOffHeapVectorValues
(OrdToDocDISIReaderConfiguration configuration, int dimension, int size, ScalarQuantizer scalarQuantizer, boolean compress, IndexInput dataIn, VectorSimilarityFunction similarityFunction, FlatVectorsScorer vectorsScorer, IndexInput slice) -
Uses of VectorSimilarityFunction in org.apache.lucene.codecs.simpletext
Fields in org.apache.lucene.codecs.simpletext declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprivate final VectorSimilarityFunction
SimpleTextKnnVectorsReader.FieldEntry.similarityFunction
The field for thesimilarityFunction
record component.Methods in org.apache.lucene.codecs.simpletext that return VectorSimilarityFunctionModifier and TypeMethodDescriptionSimpleTextFieldInfosFormat.distanceFunction
(String scoreFunction) SimpleTextKnnVectorsReader.FieldEntry.similarityFunction()
Returns the value of thesimilarityFunction
record component.Constructors in org.apache.lucene.codecs.simpletext with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionprivate
FieldEntry
(int dimension, long vectorDataOffset, long vectorDataLength, int[] ordToDoc, VectorSimilarityFunction similarityFunction) Creates an instance of aFieldEntry
record class. -
Uses of VectorSimilarityFunction in org.apache.lucene.document
Fields in org.apache.lucene.document declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprivate VectorSimilarityFunction
FieldType.vectorSimilarityFunction
Methods in org.apache.lucene.document that return VectorSimilarityFunctionMethods in org.apache.lucene.document with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescriptionstatic FieldType
KnnByteVectorField.createFieldType
(int dimension, VectorSimilarityFunction similarityFunction) A convenience method for creating a vector field type.static FieldType
KnnFloatVectorField.createFieldType
(int dimension, VectorSimilarityFunction similarityFunction) A convenience method for creating a vector field type.private static FieldType
KnnByteVectorField.createType
(byte[] v, VectorSimilarityFunction similarityFunction) private static FieldType
KnnFloatVectorField.createType
(float[] v, VectorSimilarityFunction similarityFunction) void
FieldType.setVectorAttributes
(int numDimensions, VectorEncoding encoding, VectorSimilarityFunction similarity) Enable vector indexing, with the specified number of dimensions and distance function.Constructors in org.apache.lucene.document with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionKnnByteVectorField
(String name, byte[] vector, VectorSimilarityFunction similarityFunction) Creates a numeric vector field.KnnFloatVectorField
(String name, float[] vector, VectorSimilarityFunction similarityFunction) Creates a numeric vector field. -
Uses of VectorSimilarityFunction in org.apache.lucene.index
Fields in org.apache.lucene.index declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprivate final VectorSimilarityFunction
FieldInfos.FieldVectorProperties.similarityFunction
The field for thesimilarityFunction
record component.private final VectorSimilarityFunction
FieldInfo.vectorSimilarityFunction
private VectorSimilarityFunction
IndexingChain.FieldSchema.vectorSimilarityFunction
Methods in org.apache.lucene.index that return VectorSimilarityFunctionModifier and TypeMethodDescriptionFieldInfo.getVectorSimilarityFunction()
ReturnsVectorSimilarityFunction
for the fieldFieldInfos.FieldVectorProperties.similarityFunction()
Returns the value of thesimilarityFunction
record component.static VectorSimilarityFunction
Returns the enum constant of this class with the specified name.static VectorSimilarityFunction[]
VectorSimilarityFunction.values()
Returns an array containing the constants of this enum class, in the order they are declared.IndexableFieldType.vectorSimilarityFunction()
TheVectorSimilarityFunction
of the field's vector valueMethods in org.apache.lucene.index with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) void
IndexingChain.FieldSchema.setVectors
(VectorEncoding encoding, VectorSimilarityFunction similarityFunction, int dimension) (package private) static void
FieldInfo.verifySameVectorOptions
(String fieldName, int vd1, VectorEncoding ve1, VectorSimilarityFunction vsf1, int vd2, VectorEncoding ve2, VectorSimilarityFunction vsf2) Verify that the provided vector indexing options are the sameConstructors in org.apache.lucene.index with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionFieldInfo
(String name, int number, boolean storeTermVector, boolean omitNorms, boolean storePayloads, IndexOptions indexOptions, DocValuesType docValues, DocValuesSkipIndexType docValuesSkipIndex, long dvGen, Map<String, String> attributes, int pointDimensionCount, int pointIndexDimensionCount, int pointNumBytes, int vectorDimension, VectorEncoding vectorEncoding, VectorSimilarityFunction vectorSimilarityFunction, boolean softDeletesField, boolean isParentField) Sole constructor.private
FieldVectorProperties
(int numDimensions, VectorEncoding vectorEncoding, VectorSimilarityFunction similarityFunction) Creates an instance of aFieldVectorProperties
record class. -
Uses of VectorSimilarityFunction in org.apache.lucene.queries.function.valuesource
Fields in org.apache.lucene.queries.function.valuesource declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprotected final VectorSimilarityFunction
VectorSimilarityFunction.similarityFunction
Constructors in org.apache.lucene.queries.function.valuesource with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionByteVectorSimilarityFunction
(VectorSimilarityFunction similarityFunction, ValueSource vector1, ValueSource vector2) FloatVectorSimilarityFunction
(VectorSimilarityFunction similarityFunction, ValueSource vector1, ValueSource vector2) VectorSimilarityFunction
(VectorSimilarityFunction similarityFunction, ValueSource vector1, ValueSource vector2) -
Uses of VectorSimilarityFunction in org.apache.lucene.sandbox.codecs.quantization
Methods in org.apache.lucene.sandbox.codecs.quantization with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescriptionstatic KMeans.Results
KMeans.cluster
(FloatVectorValues vectors, VectorSimilarityFunction similarityFunction, int numClusters) Cluster vectors into a given number of clusters -
Uses of VectorSimilarityFunction in org.apache.lucene.util.quantization
Fields in org.apache.lucene.util.quantization declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprivate final VectorSimilarityFunction
ScalarQuantizer.ScoreErrorCorrelator.function
Methods in org.apache.lucene.util.quantization with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescriptionprivate static float[]
ScalarQuantizer.candidateGridSearch
(List<ScalarQuantizer.ScoreDocsAndScoreVariance> nearestNeighbors, List<float[]> vectors, float[] lowerCandidates, float[] upperCandidates, VectorSimilarityFunction function, byte bits) private static List
<ScalarQuantizer.ScoreDocsAndScoreVariance> ScalarQuantizer.findNearestNeighbors
(List<float[]> vectors, VectorSimilarityFunction similarityFunction) static ScalarQuantizer
ScalarQuantizer.fromVectorsAutoInterval
(FloatVectorValues floatVectorValues, VectorSimilarityFunction function, int totalVectorCount, byte bits) ScalarQuantizedVectorSimilarity.fromVectorSimilarity
(VectorSimilarityFunction sim, float constMultiplier, byte bits) Creates aScalarQuantizedVectorSimilarity
from aVectorSimilarityFunction
and the constant multiplier used for quantization.float
ScalarQuantizer.quantize
(float[] src, byte[] dest, VectorSimilarityFunction similarityFunction) Quantize a float vector into a byte vectorfloat
ScalarQuantizer.recalculateCorrectiveOffset
(byte[] quantizedVector, ScalarQuantizer oldQuantizer, VectorSimilarityFunction similarityFunction) Recalculate the old score corrective value given new current quantilesConstructors in org.apache.lucene.util.quantization with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionScoreErrorCorrelator
(VectorSimilarityFunction function, List<ScalarQuantizer.ScoreDocsAndScoreVariance> nearestNeighbors, List<float[]> vectors, byte bits)