Module org.apache.lucene.core
Class ScalarQuantizedRandomVectorScorerSupplier
- java.lang.Object
-
- org.apache.lucene.codecs.lucene99.ScalarQuantizedRandomVectorScorerSupplier
-
- All Implemented Interfaces:
RandomVectorScorerSupplier
final class ScalarQuantizedRandomVectorScorerSupplier extends java.lang.Object implements RandomVectorScorerSupplier
Quantized vector scorer supplier
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorerSupplier
RandomVectorScorerSupplier.ByteScoringSupplier, RandomVectorScorerSupplier.FloatScoringSupplier
-
-
Field Summary
Fields Modifier and Type Field Description private ScalarQuantizedVectorSimilarity
similarity
private RandomAccessQuantizedByteVectorValues
values
-
Constructor Summary
Constructors Modifier Constructor Description (package private)
ScalarQuantizedRandomVectorScorerSupplier(VectorSimilarityFunction similarityFunction, ScalarQuantizer scalarQuantizer, RandomAccessQuantizedByteVectorValues values)
private
ScalarQuantizedRandomVectorScorerSupplier(ScalarQuantizedVectorSimilarity similarity, RandomAccessQuantizedByteVectorValues values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RandomVectorScorerSupplier
copy()
Make a copy of the supplier, which will copy the underlying vectorValues so the copy is safe to be used in other threads.RandomVectorScorer
scorer(int ord)
This creates aRandomVectorScorer
for scoring random nodes in batches against the given ordinal.
-
-
-
Field Detail
-
values
private final RandomAccessQuantizedByteVectorValues values
-
similarity
private final ScalarQuantizedVectorSimilarity similarity
-
-
Constructor Detail
-
ScalarQuantizedRandomVectorScorerSupplier
ScalarQuantizedRandomVectorScorerSupplier(VectorSimilarityFunction similarityFunction, ScalarQuantizer scalarQuantizer, RandomAccessQuantizedByteVectorValues values)
-
ScalarQuantizedRandomVectorScorerSupplier
private ScalarQuantizedRandomVectorScorerSupplier(ScalarQuantizedVectorSimilarity similarity, RandomAccessQuantizedByteVectorValues values)
-
-
Method Detail
-
scorer
public RandomVectorScorer scorer(int ord) throws java.io.IOException
Description copied from interface:RandomVectorScorerSupplier
This creates aRandomVectorScorer
for scoring random nodes in batches against the given ordinal.- Specified by:
scorer
in interfaceRandomVectorScorerSupplier
- Parameters:
ord
- the ordinal of the node to compare- Returns:
- a new
RandomVectorScorer
- Throws:
java.io.IOException
-
copy
public RandomVectorScorerSupplier copy() throws java.io.IOException
Description copied from interface:RandomVectorScorerSupplier
Make a copy of the supplier, which will copy the underlying vectorValues so the copy is safe to be used in other threads.- Specified by:
copy
in interfaceRandomVectorScorerSupplier
- Throws:
java.io.IOException
-
-