public interface VectorScorerFactory
A factory of quantized vector scorers.
-
Method Summary
Modifier and TypeMethodDescriptionOptional<org.apache.lucene.util.hnsw.RandomVectorScorer> getInt7SQVectorScorer(org.apache.lucene.index.VectorSimilarityFunction sim, org.apache.lucene.util.quantization.RandomAccessQuantizedByteVectorValues values, float[] queryVector) Returns an optional containing an int7 scalar quantized vector scorer for the given parameters, or an empty optional if a scorer is not supported.Optional<org.apache.lucene.util.hnsw.RandomVectorScorerSupplier> getInt7SQVectorScorerSupplier(VectorSimilarityType similarityType, org.apache.lucene.store.IndexInput input, org.apache.lucene.util.quantization.RandomAccessQuantizedByteVectorValues values, float scoreCorrectionConstant) Returns an optional containing an int7 scalar quantized vector score supplier for the given parameters, or an empty optional if a scorer is not supported.static Optional<VectorScorerFactory> instance()
-
Method Details
-
instance
-
getInt7SQVectorScorerSupplier
Optional<org.apache.lucene.util.hnsw.RandomVectorScorerSupplier> getInt7SQVectorScorerSupplier(VectorSimilarityType similarityType, org.apache.lucene.store.IndexInput input, org.apache.lucene.util.quantization.RandomAccessQuantizedByteVectorValues values, float scoreCorrectionConstant) Returns an optional containing an int7 scalar quantized vector score supplier for the given parameters, or an empty optional if a scorer is not supported.- Parameters:
similarityType- the similarity typeinput- the index input containing the vector data; offset of the first vector is 0, the length must be (maxOrd + Float#BYTES) * dimsvalues- the random access vector valuesscoreCorrectionConstant- the score correction constant- Returns:
- an optional containing the vector scorer supplier, or empty
-
getInt7SQVectorScorer
Optional<org.apache.lucene.util.hnsw.RandomVectorScorer> getInt7SQVectorScorer(org.apache.lucene.index.VectorSimilarityFunction sim, org.apache.lucene.util.quantization.RandomAccessQuantizedByteVectorValues values, float[] queryVector) Returns an optional containing an int7 scalar quantized vector scorer for the given parameters, or an empty optional if a scorer is not supported.- Parameters:
sim- the similarity typevalues- the random access vector valuesqueryVector- the query vector- Returns:
- an optional containing the vector scorer, or empty
-