Module org.elasticsearch.simdvec
Class MemorySegmentES92NativeInt7VectorsScorer
java.lang.Object
org.elasticsearch.simdvec.ES92Int7VectorsScorer
org.elasticsearch.simdvec.internal.MemorySegmentES92PanamaInt7VectorsScorer
org.elasticsearch.simdvec.internal.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
ConstructorsConstructorDescriptionMemorySegmentES92NativeInt7VectorsScorer(org.apache.lucene.store.IndexInput in, int dimensions, int bulkSize) -
Method Summary
Modifier and TypeMethodDescriptionlongint7DotProduct(byte[] q) compute the quantize distance between the provided quantized query and the quantized vector that is read from the wrappedIndexInput.voidint7DotProductBulk(byte[] q, int count, float[] scores) compute the quantize distance between the provided quantized query and the quantized vectors that are read from the wrappedIndexInput.voidscoreBulk(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 wrappedIndexInput.Methods inherited from class org.elasticsearch.simdvec.internal.MemorySegmentES92PanamaInt7VectorsScorer
getScratchMethods inherited from class org.elasticsearch.simdvec.ES92Int7VectorsScorer
applyCorrections, score
-
Constructor Details
-
MemorySegmentES92NativeInt7VectorsScorer
public MemorySegmentES92NativeInt7VectorsScorer(org.apache.lucene.store.IndexInput in, int dimensions, int bulkSize)
-
-
Method Details
-
int7DotProduct
Description copied from class:ES92Int7VectorsScorercompute the quantize distance between the provided quantized query and the quantized vector that is read from the wrappedIndexInput.- Overrides:
int7DotProductin classMemorySegmentES92PanamaInt7VectorsScorer- Throws:
IOException
-
int7DotProductBulk
Description copied from class:ES92Int7VectorsScorercompute the quantize distance between the provided quantized query and the quantized vectors that are read from the wrappedIndexInput. The number of quantized vectors to read is determined by {code count} and the results are stored in the providedscoresarray.- Overrides:
int7DotProductBulkin classMemorySegmentES92PanamaInt7VectorsScorer- 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:ES92Int7VectorsScorercompute the distance between the provided quantized query and the quantized vectors that are read from the wrappedIndexInput.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:
scoreBulkin classMemorySegmentES92PanamaInt7VectorsScorer- Throws:
IOException
-