Package org.apache.lucene.codecs.hnsw
Interface FlatVectorsScorer
-
- All Known Implementing Classes:
DefaultFlatVectorScorer,Lucene99ScalarQuantizedVectorScorer,ScalarQuantizedVectorScorer
public interface FlatVectorsScorerProvides mechanisms to score vectors that are stored in a flat file The purpose of this class is for providing flexibility to the codec utilizing the vectors- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RandomVectorScorergetRandomVectorScorer(VectorSimilarityFunction similarityFunction, RandomAccessVectorValues vectorValues, byte[] target)Returns aRandomVectorScorerfor the given set of vectors and target vector.RandomVectorScorergetRandomVectorScorer(VectorSimilarityFunction similarityFunction, RandomAccessVectorValues vectorValues, float[] target)Returns aRandomVectorScorerfor the given set of vectors and target vector.RandomVectorScorerSuppliergetRandomVectorScorerSupplier(VectorSimilarityFunction similarityFunction, RandomAccessVectorValues vectorValues)Returns aRandomVectorScorerSupplierthat can be used to score vectors
-
-
-
Method Detail
-
getRandomVectorScorerSupplier
RandomVectorScorerSupplier getRandomVectorScorerSupplier(VectorSimilarityFunction similarityFunction, RandomAccessVectorValues vectorValues) throws IOException
Returns aRandomVectorScorerSupplierthat can be used to score vectors- Parameters:
similarityFunction- the similarity function to usevectorValues- the vector values to score- Returns:
- a
RandomVectorScorerSupplierthat can be used to score vectors - Throws:
IOException- if an I/O error occurs
-
getRandomVectorScorer
RandomVectorScorer getRandomVectorScorer(VectorSimilarityFunction similarityFunction, RandomAccessVectorValues vectorValues, float[] target) throws IOException
Returns aRandomVectorScorerfor the given set of vectors and target vector.- Parameters:
similarityFunction- the similarity function to usevectorValues- the vector values to scoretarget- the target vector- Returns:
- a
RandomVectorScorerfor the given field and target vector. - Throws:
IOException- if an I/O error occurs when reading from the index.
-
getRandomVectorScorer
RandomVectorScorer getRandomVectorScorer(VectorSimilarityFunction similarityFunction, RandomAccessVectorValues vectorValues, byte[] target) throws IOException
Returns aRandomVectorScorerfor the given set of vectors and target vector.- Parameters:
similarityFunction- the similarity function to usevectorValues- the vector values to scoretarget- the target vector- Returns:
- a
RandomVectorScorerfor the given field and target vector. - Throws:
IOException- if an I/O error occurs when reading from the index.
-
-