Interface VectorScorerFactory


public interface VectorScorerFactory
A factory of quantized vector scorers.
  • Method Details

    • instance

      static Optional<VectorScorerFactory> instance()
    • getScalarQuantizedVectorScorer

      Optional<VectorScorer> getScalarQuantizedVectorScorer(int dims, int maxOrd, float scoreCorrectionConstant, VectorSimilarityType similarityType, org.apache.lucene.store.IndexInput indexInput)
      Returns an optional containing a scalar quantized vector scorer for the given parameters, or an empty optional if a scorer is not supported.
      Parameters:
      dims - the vector dimensions
      maxOrd - the ordinal of the largest vector accessible
      scoreCorrectionConstant - the score correction constant
      similarityType - the similarity type
      indexInput - the index input containing the vector data; offset of the first vector is 0, the length must be (maxOrd + Float#BYTES) * dims
      Returns:
      an optional containing the vector scorer, or empty