Module org.elasticsearch.simdvec
Class Int7uOSQVectorScorerSupplier
java.lang.Object
org.elasticsearch.simdvec.internal.Int7uOSQVectorScorerSupplier
- All Implemented Interfaces:
org.apache.lucene.util.hnsw.RandomVectorScorerSupplier
- Direct Known Subclasses:
Int7uOSQVectorScorerSupplier.DotProductSupplier,Int7uOSQVectorScorerSupplier.EuclideanSupplier,Int7uOSQVectorScorerSupplier.MaxInnerProductSupplier
public abstract sealed class Int7uOSQVectorScorerSupplier
extends Object
implements org.apache.lucene.util.hnsw.RandomVectorScorerSupplier
permits Int7uOSQVectorScorerSupplier.DotProductSupplier, Int7uOSQVectorScorerSupplier.EuclideanSupplier, Int7uOSQVectorScorerSupplier.MaxInnerProductSupplier
Int7uOSQVectorScorerSupplier relies on preview features of the Java platform:
Int7uOSQVectorScorerSupplierrefers to one or more preview APIs:MemorySegment.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Int7 OSQ scorer supplier backed by
MemorySegmentAccessInput storage.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final classprotected static final record -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract floatapplyCorrections(float rawScore, int ord, Int7uOSQVectorScorerSupplier.QueryContext query) protected abstract floatapplyCorrectionsBulk(MemorySegmentPREVIEW scores, MemorySegmentPREVIEW ordinals, int numNodes, Int7uOSQVectorScorerSupplier.QueryContext query) protected final floatbulkScoreFromOrds(Int7uOSQVectorScorerSupplier.QueryContext query, int[] ordinals, float[] scores, int numNodes) protected final voidcheckOrdinal(int ord) protected final voidcomputeBulk(MemorySegmentPREVIEW firstVector, MemorySegmentPREVIEW vectors, MemorySegmentPREVIEW ordinals, MemorySegmentPREVIEW scores, int numNodes) createQueryContext(int ord) org.apache.lucene.codecs.lucene104.QuantizedByteVectorValuesget()protected final longprotected final floatscoreFromOrds(Int7uOSQVectorScorerSupplier.QueryContext query, int secondOrd) org.apache.lucene.util.hnsw.UpdateableRandomVectorScorerscorer()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorerSupplier
copy
-
Field Details
-
input
protected final org.apache.lucene.store.MemorySegmentAccessInput input -
values
protected final org.apache.lucene.codecs.lucene104.QuantizedByteVectorValues values -
dims
protected final int dims -
maxOrd
protected final int maxOrd
-
-
Method Details
-
applyCorrections
protected abstract float applyCorrections(float rawScore, int ord, Int7uOSQVectorScorerSupplier.QueryContext query) throws IOException - Throws:
IOException
-
applyCorrectionsBulk
protected abstract float applyCorrectionsBulk(MemorySegmentPREVIEW scores, MemorySegmentPREVIEW ordinals, int numNodes, Int7uOSQVectorScorerSupplier.QueryContext query) throws IOException - Throws:
IOException
-
createQueryContext
- Throws:
IOException
-
checkOrdinal
protected final void checkOrdinal(int ord) -
scoreFromOrds
protected final float scoreFromOrds(Int7uOSQVectorScorerSupplier.QueryContext query, int secondOrd) throws IOException - Throws:
IOException
-
bulkScoreFromOrds
protected final float bulkScoreFromOrds(Int7uOSQVectorScorerSupplier.QueryContext query, int[] ordinals, float[] scores, int numNodes) throws IOException - Throws:
IOException
-
computeBulk
protected final void computeBulk(MemorySegmentPREVIEW firstVector, MemorySegmentPREVIEW vectors, MemorySegmentPREVIEW ordinals, MemorySegmentPREVIEW scores, int numNodes) throws IOException - Throws:
IOException
-
getVectorPitch
protected final long getVectorPitch() -
scorer
public org.apache.lucene.util.hnsw.UpdateableRandomVectorScorer scorer()- Specified by:
scorerin interfaceorg.apache.lucene.util.hnsw.RandomVectorScorerSupplier
-
get
public org.apache.lucene.codecs.lucene104.QuantizedByteVectorValues get()
-
Int7uOSQVectorScorerSupplierwhen preview features are enabled.