Class MemorySegmentES92NativeInt7VectorsScorer


public final class MemorySegmentES92NativeInt7VectorsScorer extends MemorySegmentES92PanamaInt7VectorsScorer
Native / panamized scorer for 7-bit quantized vectors stored as an IndexInput.
  • Field Summary

    Fields inherited from class org.elasticsearch.simdvec.ES92Int7VectorsScorer

    dimensions, in, SEVEN_BIT_SCALE
  • Constructor Summary

    Constructors
    Constructor
    Description
    MemorySegmentES92NativeInt7VectorsScorer(org.apache.lucene.store.IndexInput in, int dimensions, int bulkSize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    int7DotProduct(byte[] q)
    compute the quantize distance between the provided quantized query and the quantized vector that is read from the wrapped IndexInput.
    void
    int7DotProductBulk(byte[] q, int count, float[] scores)
    compute the quantize distance between the provided quantized query and the quantized vectors that are read from the wrapped IndexInput.
    void
    scoreBulk(byte[] q, float queryLowerInterval, float queryUpperInterval, int queryComponentSum, float queryAdditionalCorrection, org.apache.lucene.index.VectorSimilarityFunction similarityFunction, float centroidDp, float[] scores, int bulkSize)
    compute the distance between the provided quantized query and the quantized vectors that are read from the wrapped IndexInput.

    Methods inherited from class org.elasticsearch.simdvec.internal.MemorySegmentES92PanamaInt7VectorsScorer

    getScratch

    Methods inherited from class org.elasticsearch.simdvec.ES92Int7VectorsScorer

    applyCorrections, score

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MemorySegmentES92NativeInt7VectorsScorer

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

    • int7DotProduct

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

      public void int7DotProductBulk(byte[] q, int count, float[] scores) throws IOException
      Description copied from class: ES92Int7VectorsScorer
      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:
      int7DotProductBulk in class MemorySegmentES92PanamaInt7VectorsScorer
      Throws:
      IOException
    • scoreBulk

      public void scoreBulk(byte[] q, float queryLowerInterval, float queryUpperInterval, int queryComponentSum, float queryAdditionalCorrection, org.apache.lucene.index.VectorSimilarityFunction similarityFunction, float centroidDp, float[] scores, int bulkSize) throws IOException
      Description copied from class: ES92Int7VectorsScorer
      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 #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 MemorySegmentES92PanamaInt7VectorsScorer
      Throws:
      IOException