Uses of Class
org.apache.lucene.index.VectorSimilarityFunction
-
Packages that use VectorSimilarityFunction Package Description org.apache.lucene.document The logical representation of aDocument
for indexing and searching.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. -
-
Uses of VectorSimilarityFunction in org.apache.lucene.document
Methods in org.apache.lucene.document that return VectorSimilarityFunction Modifier and Type Method Description VectorSimilarityFunction
FieldType. vectorSimilarityFunction()
Methods in org.apache.lucene.document with parameters of type VectorSimilarityFunction Modifier and Type Method Description static FieldType
KnnVectorField. createFieldType(int dimension, VectorSimilarityFunction similarityFunction)
A convenience method for creating a vector field type.void
FieldType. setVectorDimensionsAndSimilarityFunction(int numDimensions, VectorSimilarityFunction distFunc)
Enable vector indexing, with the specified number of dimensions and distance function.Constructors in org.apache.lucene.document with parameters of type VectorSimilarityFunction Constructor Description KnnVectorField(String name, float[] vector, VectorSimilarityFunction similarityFunction)
Creates a numeric vector field. -
Uses of VectorSimilarityFunction in org.apache.lucene.index
Methods in org.apache.lucene.index that return VectorSimilarityFunction Modifier and Type Method Description VectorSimilarityFunction
FieldInfo. getVectorSimilarityFunction()
ReturnsVectorSimilarityFunction
for the fieldstatic VectorSimilarityFunction
VectorSimilarityFunction. valueOf(String name)
Returns the enum constant of this type with the specified name.static VectorSimilarityFunction[]
VectorSimilarityFunction. values()
Returns an array containing the constants of this enum type, in the order they are declared.VectorSimilarityFunction
IndexableFieldType. vectorSimilarityFunction()
TheVectorSimilarityFunction
of the field's vector valueConstructors in org.apache.lucene.index with parameters of type VectorSimilarityFunction Constructor Description FieldInfo(String name, int number, boolean storeTermVector, boolean omitNorms, boolean storePayloads, IndexOptions indexOptions, DocValuesType docValues, long dvGen, Map<String,String> attributes, int pointDimensionCount, int pointIndexDimensionCount, int pointNumBytes, int vectorDimension, VectorSimilarityFunction vectorSimilarityFunction, boolean softDeletesField)
Sole constructor. -
Uses of VectorSimilarityFunction in org.apache.lucene.util.hnsw
Methods in org.apache.lucene.util.hnsw with parameters of type VectorSimilarityFunction Modifier and Type Method Description static NeighborQueue
HnswGraphSearcher. search(float[] query, int topK, RandomAccessVectorValues vectors, VectorSimilarityFunction similarityFunction, HnswGraph graph, Bits acceptOrds, int visitedLimit)
Searches HNSW graph for the nearest neighbors of a query vector.Constructors in org.apache.lucene.util.hnsw with parameters of type VectorSimilarityFunction Constructor Description HnswGraphBuilder(RandomAccessVectorValuesProducer vectors, VectorSimilarityFunction similarityFunction, int M, int beamWidth, long seed)
Reads all the vectors from a VectorValues, builds a graph connecting them by their dense ordinals, using the given hyperparameter settings, and returns the resulting graph.HnswGraphSearcher(VectorSimilarityFunction similarityFunction, NeighborQueue candidates, BitSet visited)
Creates a new graph searcher.
-