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 VectorSimilarityFunctionWord2VecSynonymProvider.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 VectorSimilarityFunctionLucene90HnswGraphBuilder.similarityFunctionprivate final VectorSimilarityFunctionLucene90HnswVectorsReader.FieldEntry.similarityFunctionThe field for thesimilarityFunctionrecord component.(package private) final VectorSimilarityFunctionLucene90HnswVectorsReader.OffHeapFloatVectorValues.similarityFunctionMethods in org.apache.lucene.backward_codecs.lucene90 that return VectorSimilarityFunctionModifier and TypeMethodDescriptionprivate static VectorSimilarityFunctionLucene90FieldInfosFormat.getDistFunc(IndexInput input, byte b) private VectorSimilarityFunctionLucene90HnswVectorsReader.readSimilarityFunction(DataInput input) Lucene90HnswVectorsReader.FieldEntry.similarityFunction()Returns the value of thesimilarityFunctionrecord component.Methods in org.apache.lucene.backward_codecs.lucene90 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static Lucene90HnswVectorsReader.FieldEntryLucene90HnswVectorsReader.FieldEntry.create(DataInput input, VectorSimilarityFunction similarityFunction) static NeighborQueueLucene90OnHeapHnswGraph.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 VectorSimilarityFunctionModifierConstructorDescriptionprivateFieldEntry(VectorSimilarityFunction similarityFunction, long vectorDataOffset, long vectorDataLength, long indexDataOffset, long indexDataLength, int dimension, int[] ordToDoc, long[] ordOffsets) Creates an instance of aFieldEntryrecord 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 VectorSimilarityFunctionLucene91HnswVectorsReader.FieldEntry.similarityFunctionThe field for thesimilarityFunctionrecord component.private final VectorSimilarityFunctionLucene91HnswVectorsReader.OffHeapFloatVectorValues.similarityFunctionMethods in org.apache.lucene.backward_codecs.lucene91 that return VectorSimilarityFunctionModifier and TypeMethodDescriptionprivate VectorSimilarityFunctionLucene91HnswVectorsReader.readSimilarityFunction(DataInput input) Lucene91HnswVectorsReader.FieldEntry.similarityFunction()Returns the value of thesimilarityFunctionrecord component.Methods in org.apache.lucene.backward_codecs.lucene91 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static Lucene91HnswVectorsReader.FieldEntryLucene91HnswVectorsReader.FieldEntry.create(DataInput input, VectorSimilarityFunction similarityFunction) Constructors in org.apache.lucene.backward_codecs.lucene91 with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionprivateFieldEntry(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 aFieldEntryrecord 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 VectorSimilarityFunctionLucene92HnswVectorsReader.FieldEntry.similarityFunctionThe field for thesimilarityFunctionrecord component.protected final VectorSimilarityFunctionOffHeapFloatVectorValues.vectorSimilarityFunctionMethods in org.apache.lucene.backward_codecs.lucene92 that return VectorSimilarityFunctionModifier and TypeMethodDescriptionprivate VectorSimilarityFunctionLucene92HnswVectorsReader.readSimilarityFunction(DataInput input) Lucene92HnswVectorsReader.FieldEntry.similarityFunction()Returns the value of thesimilarityFunctionrecord component.Methods in org.apache.lucene.backward_codecs.lucene92 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static Lucene92HnswVectorsReader.FieldEntryLucene92HnswVectorsReader.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 aFieldEntryrecord 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 VectorSimilarityFunctionLucene94HnswVectorsReader.FieldEntry.similarityFunctionThe field for thesimilarityFunctionrecord component.protected final VectorSimilarityFunctionOffHeapByteVectorValues.vectorSimilarityFunctionprotected final VectorSimilarityFunctionOffHeapFloatVectorValues.vectorSimilarityFunctionMethods in org.apache.lucene.backward_codecs.lucene94 that return VectorSimilarityFunctionModifier and TypeMethodDescriptionprivate VectorSimilarityFunctionLucene94HnswVectorsReader.readSimilarityFunction(DataInput input) Lucene94HnswVectorsReader.FieldEntry.similarityFunction()Returns the value of thesimilarityFunctionrecord component.Methods in org.apache.lucene.backward_codecs.lucene94 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static Lucene94HnswVectorsReader.FieldEntryLucene94HnswVectorsReader.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 aFieldEntryrecord 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 VectorSimilarityFunctionLucene95HnswVectorsReader.FieldEntry.similarityFunctionThe field for thesimilarityFunctionrecord component.Methods in org.apache.lucene.backward_codecs.lucene95 that return VectorSimilarityFunctionModifier and TypeMethodDescriptionprivate VectorSimilarityFunctionLucene95HnswVectorsReader.readSimilarityFunction(DataInput input) Lucene95HnswVectorsReader.FieldEntry.similarityFunction()Returns the value of thesimilarityFunctionrecord component.Methods in org.apache.lucene.backward_codecs.lucene95 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static Lucene95HnswVectorsReader.FieldEntryLucene95HnswVectorsReader.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 aFieldEntryrecord 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 VectorSimilarityFunctionDefaultFlatVectorScorer.ByteScoringSupplier.similarityFunctionprivate final VectorSimilarityFunctionDefaultFlatVectorScorer.ByteVectorScorer.similarityFunctionprivate final VectorSimilarityFunctionDefaultFlatVectorScorer.FloatScoringSupplier.similarityFunctionprivate final VectorSimilarityFunctionDefaultFlatVectorScorer.FloatVectorScorer.similarityFunctionprivate final VectorSimilarityFunctionScalarQuantizedVectorScorer.ScalarQuantizedRandomVectorScorerSupplier.vectorSimilarityFunctionMethods 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 aRandomVectorScorerfor the given set of vectors and target vector.FlatVectorsScorer.getRandomVectorScorer(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues, float[] target) Returns aRandomVectorScorerfor 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 aRandomVectorScorerSupplierthat can be used to score vectorsScalarQuantizedVectorScorer.getRandomVectorScorerSupplier(VectorSimilarityFunction similarityFunction, KnnVectorValues vectorValues) static floatScalarQuantizedVectorScorer.quantizeQuery(float[] query, byte[] quantizedQuery, VectorSimilarityFunction similarityFunction, ScalarQuantizer scalarQuantizer) Constructors in org.apache.lucene.codecs.hnsw with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionprivateByteScoringSupplier(ByteVectorValues vectors, VectorSimilarityFunction similarityFunction) ByteVectorScorer(ByteVectorValues values, byte[] query, VectorSimilarityFunction similarityFunction) privateFloatScoringSupplier(FloatVectorValues vectors, VectorSimilarityFunction similarityFunction) FloatVectorScorer(FloatVectorValues values, float[] query, VectorSimilarityFunction similarityFunction) ScalarQuantizedRandomVectorScorerSupplier(VectorSimilarityFunction similarityFunction, ScalarQuantizer scalarQuantizer, QuantizedByteVectorValues values) privateScalarQuantizedRandomVectorScorerSupplier(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_FUNCTIONSMethods in org.apache.lucene.codecs.lucene94 that return VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static VectorSimilarityFunctionLucene94FieldInfosFormat.distOrdToFunc(byte i) private static VectorSimilarityFunctionLucene94FieldInfosFormat.getDistFunc(IndexInput input, byte b) Methods in org.apache.lucene.codecs.lucene94 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static byteLucene94FieldInfosFormat.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 VectorSimilarityFunctionOffHeapByteVectorValues.similarityFunctionprotected final VectorSimilarityFunctionOffHeapFloatVectorValues.similarityFunctionMethods in org.apache.lucene.codecs.lucene95 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescriptionstatic OffHeapByteVectorValuesOffHeapByteVectorValues.load(VectorSimilarityFunction vectorSimilarityFunction, FlatVectorsScorer flatVectorsScorer, OrdToDocDISIReaderConfiguration configuration, VectorEncoding vectorEncoding, int dimension, long vectorDataOffset, long vectorDataLength, IndexInput vectorData) static OffHeapFloatVectorValuesOffHeapFloatVectorValues.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 VectorSimilarityFunctionLucene99FlatVectorsReader.FieldEntry.similarityFunctionThe field for thesimilarityFunctionrecord component.private final VectorSimilarityFunctionLucene99HnswVectorsReader.FieldEntry.similarityFunctionThe field for thesimilarityFunctionrecord component.private final VectorSimilarityFunctionLucene99ScalarQuantizedVectorsReader.FieldEntry.similarityFunctionThe field for thesimilarityFunctionrecord component.protected final VectorSimilarityFunctionOffHeapQuantizedByteVectorValues.similarityFunctionprivate final VectorSimilarityFunctionLucene99ScalarQuantizedVectorScorer.ScalarQuantizedRandomVectorScorerSupplier.vectorSimilarityFunctionprivate final VectorSimilarityFunctionLucene99ScalarQuantizedVectorsWriter.OffsetCorrectedQuantizedByteVectorValues.vectorSimilarityFunctionprivate final VectorSimilarityFunctionLucene99ScalarQuantizedVectorsWriter.QuantizedFloatVectorValues.vectorSimilarityFunctionFields in org.apache.lucene.codecs.lucene99 with type parameters of type VectorSimilarityFunctionModifier and TypeFieldDescriptionstatic final List<VectorSimilarityFunction> Lucene99HnswVectorsReader.SIMILARITY_FUNCTIONSMethods in org.apache.lucene.codecs.lucene99 that return VectorSimilarityFunctionModifier and TypeMethodDescriptionstatic VectorSimilarityFunctionLucene99HnswVectorsReader.readSimilarityFunction(DataInput input) Lucene99FlatVectorsReader.FieldEntry.similarityFunction()Returns the value of thesimilarityFunctionrecord component.Lucene99HnswVectorsReader.FieldEntry.similarityFunction()Returns the value of thesimilarityFunctionrecord component.Lucene99ScalarQuantizedVectorsReader.FieldEntry.similarityFunction()Returns the value of thesimilarityFunctionrecord component.Methods in org.apache.lucene.codecs.lucene99 with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) static ScalarQuantizerLucene99ScalarQuantizedVectorsWriter.buildScalarQuantizer(FloatVectorValues floatVectorValues, int numVectors, VectorSimilarityFunction vectorSimilarityFunction, Float confidenceInterval, byte bits) (package private) static Lucene99HnswVectorsReader.FieldEntryLucene99HnswVectorsReader.FieldEntry.create(IndexInput input, VectorEncoding vectorEncoding, VectorSimilarityFunction similarityFunction) (package private) static Lucene99ScalarQuantizedVectorsReader.FieldEntryLucene99ScalarQuantizedVectorsReader.FieldEntry.create(IndexInput input, int versionMeta, VectorEncoding vectorEncoding, VectorSimilarityFunction similarityFunction) (package private) static intLucene99HnswVectorsWriter.distFuncToOrd(VectorSimilarityFunction func) (package private) static RandomVectorScorerLucene99ScalarQuantizedVectorScorer.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 aFieldEntryrecord class.privateFieldEntry(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 aFieldEntryrecord class.privateFieldEntry(VectorSimilarityFunction similarityFunction, VectorEncoding vectorEncoding, int dimension, long vectorDataOffset, long vectorDataLength, ScalarQuantizer scalarQuantizer, int size, byte bits, boolean compress, OrdToDocDISIReaderConfiguration ordToDoc) Creates an instance of aFieldEntryrecord 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 VectorSimilarityFunctionSimpleTextKnnVectorsReader.FieldEntry.similarityFunctionThe field for thesimilarityFunctionrecord component.Methods in org.apache.lucene.codecs.simpletext that return VectorSimilarityFunctionModifier and TypeMethodDescriptionSimpleTextFieldInfosFormat.distanceFunction(String scoreFunction) SimpleTextKnnVectorsReader.FieldEntry.similarityFunction()Returns the value of thesimilarityFunctionrecord component.Constructors in org.apache.lucene.codecs.simpletext with parameters of type VectorSimilarityFunctionModifierConstructorDescriptionprivateFieldEntry(int dimension, long vectorDataOffset, long vectorDataLength, int[] ordToDoc, VectorSimilarityFunction similarityFunction) Creates an instance of aFieldEntryrecord class. -
Uses of VectorSimilarityFunction in org.apache.lucene.document
Fields in org.apache.lucene.document declared as VectorSimilarityFunctionModifier and TypeFieldDescriptionprivate VectorSimilarityFunctionFieldType.vectorSimilarityFunctionMethods in org.apache.lucene.document that return VectorSimilarityFunctionMethods in org.apache.lucene.document with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescriptionstatic FieldTypeKnnByteVectorField.createFieldType(int dimension, VectorSimilarityFunction similarityFunction) A convenience method for creating a vector field type.static FieldTypeKnnFloatVectorField.createFieldType(int dimension, VectorSimilarityFunction similarityFunction) A convenience method for creating a vector field type.private static FieldTypeKnnByteVectorField.createType(byte[] v, VectorSimilarityFunction similarityFunction) private static FieldTypeKnnFloatVectorField.createType(float[] v, VectorSimilarityFunction similarityFunction) voidFieldType.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 VectorSimilarityFunctionFieldInfos.FieldVectorProperties.similarityFunctionThe field for thesimilarityFunctionrecord component.private final VectorSimilarityFunctionFieldInfo.vectorSimilarityFunctionprivate VectorSimilarityFunctionIndexingChain.FieldSchema.vectorSimilarityFunctionMethods in org.apache.lucene.index that return VectorSimilarityFunctionModifier and TypeMethodDescriptionFieldInfo.getVectorSimilarityFunction()ReturnsVectorSimilarityFunctionfor the fieldFieldInfos.FieldVectorProperties.similarityFunction()Returns the value of thesimilarityFunctionrecord component.static VectorSimilarityFunctionReturns 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()TheVectorSimilarityFunctionof the field's vector valueMethods in org.apache.lucene.index with parameters of type VectorSimilarityFunctionModifier and TypeMethodDescription(package private) voidIndexingChain.FieldSchema.setVectors(VectorEncoding encoding, VectorSimilarityFunction similarityFunction, int dimension) (package private) static voidFieldInfo.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.privateFieldVectorProperties(int numDimensions, VectorEncoding vectorEncoding, VectorSimilarityFunction similarityFunction) Creates an instance of aFieldVectorPropertiesrecord 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 VectorSimilarityFunctionVectorSimilarityFunction.similarityFunctionConstructors 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.ResultsKMeans.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 VectorSimilarityFunctionScalarQuantizer.ScoreErrorCorrelator.functionMethods 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 ScalarQuantizerScalarQuantizer.fromVectorsAutoInterval(FloatVectorValues floatVectorValues, VectorSimilarityFunction function, int totalVectorCount, byte bits) ScalarQuantizedVectorSimilarity.fromVectorSimilarity(VectorSimilarityFunction sim, float constMultiplier, byte bits) Creates aScalarQuantizedVectorSimilarityfrom aVectorSimilarityFunctionand the constant multiplier used for quantization.floatScalarQuantizer.quantize(float[] src, byte[] dest, VectorSimilarityFunction similarityFunction) Quantize a float vector into a byte vectorfloatScalarQuantizer.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)