Module org.elasticsearch.server
Class BinarizedByteVectorValues
java.lang.Object
org.apache.lucene.index.KnnVectorValues
org.apache.lucene.index.ByteVectorValues
org.elasticsearch.index.codec.vectors.es816.BinarizedByteVectorValues
public abstract class BinarizedByteVectorValues
extends org.apache.lucene.index.ByteVectorValues
Copied from Lucene, replace with Lucene's implementation sometime after Lucene 10
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.KnnVectorValues
org.apache.lucene.index.KnnVectorValues.DocIndexIterator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract BinarizedByteVectorValuescopy()abstract intReturn the dimension of the vectorsabstract float[]abstract floatgetCentroidDistance(int vectorOrd) Returns the centroid distance for the vectorabstract float[]getCorrectiveTerms(int vectorOrd) abstract floatgetNormOC(int targetOrd) Returns the norm of the target vector w the centroid corrective factor for the given vector ordinalabstract floatgetODotC(int targetOrd) Returns the target vector dot product the centroid corrective factor for the given vector ordinalabstract floatgetOOQ(int targetOrd) Returns OOQ corrective factor for the given vector ordinalabstract BinaryQuantizerabstract floatgetVectorMagnitude(int vectorOrd) Returns the vector magnitude for the vectorabstract org.apache.lucene.search.VectorScorerscorer(float[] query) Return aVectorScorerfor the given query vector.abstract intsize()Return the number of vectors for this field.Methods inherited from class org.apache.lucene.index.ByteVectorValues
checkField, fromBytes, getEncoding, scorer, vectorValueMethods inherited from class org.apache.lucene.index.KnnVectorValues
createDenseIterator, createSparseIterator, fromDISI, getAcceptOrds, getVectorByteLength, iterator, ordToDoc
-
Constructor Details
-
BinarizedByteVectorValues
public BinarizedByteVectorValues()
-
-
Method Details
-
getCorrectiveTerms
- Throws:
IOException
-
dimension
public abstract int dimension()Return the dimension of the vectors- Specified by:
dimensionin classorg.apache.lucene.index.KnnVectorValues
-
getCentroidDistance
Returns the centroid distance for the vector- Throws:
IOException
-
getVectorMagnitude
Returns the vector magnitude for the vector- Throws:
IOException
-
getOOQ
Returns OOQ corrective factor for the given vector ordinal- Throws:
IOException
-
getNormOC
Returns the norm of the target vector w the centroid corrective factor for the given vector ordinal- Throws:
IOException
-
getODotC
Returns the target vector dot product the centroid corrective factor for the given vector ordinal- Throws:
IOException
-
getQuantizer
- Returns:
- the quantizer used to quantize the vectors
-
getCentroid
- Throws:
IOException
-
size
public abstract int size()Return the number of vectors for this field.- Specified by:
sizein classorg.apache.lucene.index.KnnVectorValues- Returns:
- the number of vectors returned by this iterator
-
scorer
Return aVectorScorerfor the given query vector.- Parameters:
query- the query vector- Returns:
- a
VectorScorerinstance or null - Throws:
IOException
-
copy
- Specified by:
copyin classorg.apache.lucene.index.ByteVectorValues- Throws:
IOException
-