Module org.elasticsearch.simdvec
Class MemorySegmentES92PanamaInt7VectorsScorer
java.lang.Object
org.elasticsearch.simdvec.ES92Int7VectorsScorer
org.elasticsearch.simdvec.internal.MemorySegmentES92PanamaInt7VectorsScorer
- Direct Known Subclasses:
MemorySegmentES92NativeInt7VectorsScorer
public sealed class MemorySegmentES92PanamaInt7VectorsScorer
extends ES92Int7VectorsScorer
permits MemorySegmentES92NativeInt7VectorsScorer
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
ConstructorsConstructorDescriptionMemorySegmentES92PanamaInt7VectorsScorer(org.apache.lucene.store.IndexInput in, int dimensions, int bulkSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]getScratch(int len) longint7DotProduct(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.ES92Int7VectorsScorer
applyCorrections, score
-
Constructor Details
-
MemorySegmentES92PanamaInt7VectorsScorer
public MemorySegmentES92PanamaInt7VectorsScorer(org.apache.lucene.store.IndexInput in, int dimensions, int bulkSize)
-
-
Method Details
-
getScratch
protected byte[] getScratch(int len) -
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 classES92Int7VectorsScorer- 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 classES92Int7VectorsScorer- 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 classES92Int7VectorsScorer- Throws:
IOException
-