Class OffHeapQuantizedByteVectorValues

java.lang.Object
org.apache.lucene.index.KnnVectorValues
org.apache.lucene.index.ByteVectorValues
org.apache.lucene.util.quantization.QuantizedByteVectorValues
org.elasticsearch.index.codec.vectors.OffHeapQuantizedByteVectorValues
All Implemented Interfaces:
org.apache.lucene.codecs.lucene95.HasIndexSlice
Direct Known Subclasses:
OffHeapQuantizedByteVectorValues.DenseOffHeapVectorValues

public abstract class OffHeapQuantizedByteVectorValues extends org.apache.lucene.util.quantization.QuantizedByteVectorValues
Copied from Lucene 10.3. Read the quantized vector values and their score correction values from the index input. This supports both iterated and random access.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Dense vector values that are stored off-heap.

    Nested classes/interfaces inherited from class org.apache.lucene.index.KnnVectorValues

    org.apache.lucene.index.KnnVectorValues.DocIndexIterator
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    org.apache.lucene.util.quantization.ScalarQuantizer
     
    float
     
    org.apache.lucene.store.IndexInput
     
    int
     
    int
     
    byte[]
    vectorValue(int targetOrd)
     

    Methods inherited from class org.apache.lucene.util.quantization.QuantizedByteVectorValues

    copy, scorer

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

    checkField, fromBytes, getEncoding, rescorer, scorer

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

    createDenseIterator, createSparseIterator, fromDISI, getAcceptOrds, iterator, ordToDoc

    Methods inherited from class java.lang.Object

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

    • getScalarQuantizer

      public org.apache.lucene.util.quantization.ScalarQuantizer getScalarQuantizer()
      Overrides:
      getScalarQuantizer in class org.apache.lucene.util.quantization.QuantizedByteVectorValues
    • dimension

      public int dimension()
      Specified by:
      dimension in class org.apache.lucene.index.KnnVectorValues
    • size

      public int size()
      Specified by:
      size in class org.apache.lucene.index.KnnVectorValues
    • vectorValue

      public byte[] vectorValue(int targetOrd) throws IOException
      Specified by:
      vectorValue in class org.apache.lucene.index.ByteVectorValues
      Throws:
      IOException
    • getScoreCorrectionConstant

      public float getScoreCorrectionConstant(int targetOrd) throws IOException
      Specified by:
      getScoreCorrectionConstant in class org.apache.lucene.util.quantization.QuantizedByteVectorValues
      Throws:
      IOException
    • getSlice

      public org.apache.lucene.store.IndexInput getSlice()
      Specified by:
      getSlice in interface org.apache.lucene.codecs.lucene95.HasIndexSlice
      Overrides:
      getSlice in class org.apache.lucene.util.quantization.QuantizedByteVectorValues
    • getVectorByteLength

      public int getVectorByteLength()
      Overrides:
      getVectorByteLength in class org.apache.lucene.index.KnnVectorValues