Class MemorySegmentES91OSQVectorsScorer

java.lang.Object
org.elasticsearch.simdvec.ES91OSQVectorsScorer
org.elasticsearch.simdvec.internal.vectorization.MemorySegmentES91OSQVectorsScorer

public final class MemorySegmentES91OSQVectorsScorer extends ES91OSQVectorsScorer
Panamized scorer for quantized vectors stored as a MemorySegmentPREVIEW.
  • Constructor Details

    • MemorySegmentES91OSQVectorsScorer

      public MemorySegmentES91OSQVectorsScorer(org.apache.lucene.store.IndexInput in, int dimensions, int bulkSize)
  • Method Details

    • quantizeScore

      public long quantizeScore(byte[] q) throws IOException
      Description copied from class: ES91OSQVectorsScorer
      compute the quantize distance between the provided quantized query and the quantized vector that is read from the wrapped IndexInput.
      Overrides:
      quantizeScore in class ES91OSQVectorsScorer
      Throws:
      IOException
    • quantizeScoreBulk

      public void quantizeScoreBulk(byte[] q, int count, float[] scores) throws IOException
      Description copied from class: ES91OSQVectorsScorer
      compute the quantize distance between the provided quantized query and the quantized vectors that are read from the wrapped IndexInput. The number of quantized vectors to read is determined by {code count} and the results are stored in the provided scores array.
      Overrides:
      quantizeScoreBulk in class ES91OSQVectorsScorer
      Throws:
      IOException
    • scoreBulk

      public float scoreBulk(byte[] q, float queryLowerInterval, float queryUpperInterval, int queryComponentSum, float queryAdditionalCorrection, org.apache.lucene.index.VectorSimilarityFunction similarityFunction, float centroidDp, float[] scores) throws IOException
      Description copied from class: ES91OSQVectorsScorer
      compute the distance between the provided quantized query and the quantized vectors that are read from the wrapped IndexInput.

      The number of vectors to score is defined by ES91OSQVectorsScorer.bulkSize. The expected format of the input is as follows: First the quantized vectors are read from the input,then all the lower intervals as floats, then all the upper intervals as floats, then all the target component sums as shorts, and finally all the additional corrections as floats.

      The results are stored in the provided scores array.

      Overrides:
      scoreBulk in class ES91OSQVectorsScorer
      Throws:
      IOException