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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    abstract int
    Return the dimension of the vectors
    abstract float[]
     
    abstract float
    getCentroidDistance(int vectorOrd)
    Returns the centroid distance for the vector
    abstract float[]
    getCorrectiveTerms(int vectorOrd)
     
    abstract float
    getNormOC(int targetOrd)
    Returns the norm of the target vector w the centroid corrective factor for the given vector ordinal
    abstract float
    getODotC(int targetOrd)
    Returns the target vector dot product the centroid corrective factor for the given vector ordinal
    abstract float
    getOOQ(int targetOrd)
    Returns OOQ corrective factor for the given vector ordinal
     
    abstract float
    getVectorMagnitude(int vectorOrd)
    Returns the vector magnitude for the vector
    abstract org.apache.lucene.search.VectorScorer
    scorer(float[] query)
    Return a VectorScorer for the given query vector.
    abstract int
    Return the number of vectors for this field.

    Methods inherited from class org.apache.lucene.index.ByteVectorValues

    checkField, fromBytes, getEncoding, scorer, vectorValue

    Methods inherited from class org.apache.lucene.index.KnnVectorValues

    createDenseIterator, createSparseIterator, fromDISI, getAcceptOrds, getVectorByteLength, iterator, ordToDoc

    Methods inherited from class java.lang.Object

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

    • BinarizedByteVectorValues

      public BinarizedByteVectorValues()
  • Method Details

    • getCorrectiveTerms

      public abstract float[] getCorrectiveTerms(int vectorOrd) throws IOException
      Throws:
      IOException
    • dimension

      public abstract int dimension()
      Return the dimension of the vectors
      Specified by:
      dimension in class org.apache.lucene.index.KnnVectorValues
    • getCentroidDistance

      public abstract float getCentroidDistance(int vectorOrd) throws IOException
      Returns the centroid distance for the vector
      Throws:
      IOException
    • getVectorMagnitude

      public abstract float getVectorMagnitude(int vectorOrd) throws IOException
      Returns the vector magnitude for the vector
      Throws:
      IOException
    • getOOQ

      public abstract float getOOQ(int targetOrd) throws IOException
      Returns OOQ corrective factor for the given vector ordinal
      Throws:
      IOException
    • getNormOC

      public abstract float getNormOC(int targetOrd) throws IOException
      Returns the norm of the target vector w the centroid corrective factor for the given vector ordinal
      Throws:
      IOException
    • getODotC

      public abstract float getODotC(int targetOrd) throws IOException
      Returns the target vector dot product the centroid corrective factor for the given vector ordinal
      Throws:
      IOException
    • getQuantizer

      public abstract BinaryQuantizer getQuantizer()
      Returns:
      the quantizer used to quantize the vectors
    • getCentroid

      public abstract float[] getCentroid() throws IOException
      Throws:
      IOException
    • size

      public abstract int size()
      Return the number of vectors for this field.
      Specified by:
      size in class org.apache.lucene.index.KnnVectorValues
      Returns:
      the number of vectors returned by this iterator
    • scorer

      public abstract org.apache.lucene.search.VectorScorer scorer(float[] query) throws IOException
      Return a VectorScorer for the given query vector.
      Parameters:
      query - the query vector
      Returns:
      a VectorScorer instance or null
      Throws:
      IOException
    • copy

      public abstract BinarizedByteVectorValues copy() throws IOException
      Specified by:
      copy in class org.apache.lucene.index.ByteVectorValues
      Throws:
      IOException