Package org.apache.lucene.codecs.hnsw
Interface FlatVectorsScorer
-
- All Known Implementing Classes:
DefaultFlatVectorScorer
,Lucene99ScalarQuantizedVectorScorer
,ScalarQuantizedVectorScorer
public interface FlatVectorsScorer
Provides 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 RandomVectorScorer
getRandomVectorScorer(VectorSimilarityFunction similarityFunction, RandomAccessVectorValues vectorValues, byte[] target)
Returns aRandomVectorScorer
for the given set of vectors and target vector.RandomVectorScorer
getRandomVectorScorer(VectorSimilarityFunction similarityFunction, RandomAccessVectorValues vectorValues, float[] target)
Returns aRandomVectorScorer
for the given set of vectors and target vector.RandomVectorScorerSupplier
getRandomVectorScorerSupplier(VectorSimilarityFunction similarityFunction, RandomAccessVectorValues vectorValues)
Returns aRandomVectorScorerSupplier
that can be used to score vectors
-
-
-
Method Detail
-
getRandomVectorScorerSupplier
RandomVectorScorerSupplier getRandomVectorScorerSupplier(VectorSimilarityFunction similarityFunction, RandomAccessVectorValues vectorValues) throws IOException
Returns aRandomVectorScorerSupplier
that can be used to score vectors- Parameters:
similarityFunction
- the similarity function to usevectorValues
- the vector values to score- Returns:
- a
RandomVectorScorerSupplier
that 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 aRandomVectorScorer
for 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
RandomVectorScorer
for 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 aRandomVectorScorer
for 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
RandomVectorScorer
for the given field and target vector. - Throws:
IOException
- if an I/O error occurs when reading from the index.
-
-