Class OffHeapBFloat16VectorValues

java.lang.Object
org.apache.lucene.index.KnnVectorValues
org.apache.lucene.index.FloatVectorValues
org.elasticsearch.index.codec.vectors.es93.BFloat16VectorValues
org.elasticsearch.index.codec.vectors.es93.OffHeapBFloat16VectorValues
All Implemented Interfaces:
org.apache.lucene.codecs.lucene95.HasIndexSlice
Direct Known Subclasses:
OffHeapBFloat16VectorValues.DenseOffHeapVectorValues

public abstract class OffHeapBFloat16VectorValues extends BFloat16VectorValues implements org.apache.lucene.codecs.lucene95.HasIndexSlice
  • 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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final byte[]
     
    protected final int
     
    protected final int
     
    protected final org.apache.lucene.codecs.hnsw.FlatVectorsScorer
     
    protected int
     
    protected int
     
    protected final org.apache.lucene.index.VectorSimilarityFunction
     
    protected final int
     
    protected final org.apache.lucene.store.IndexInput
     
    protected final float[]
     
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    bfloat16VectorBytes(int targetOrd)
    Returns the bfloat16 vector bytes for the given ordinal.
    int
     
    org.apache.lucene.store.IndexInput
     
    int
     
    int
     
    float[]
    vectorValue(int targetOrd)
     

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

    checkField, copy, fromFloats, 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
  • Field Details

    • dimension

      protected final int dimension
    • size

      protected final int size
    • slice

      protected final org.apache.lucene.store.IndexInput slice
    • byteSize

      protected final int byteSize
    • lastBFloat16Ord

      protected int lastBFloat16Ord
    • bfloatBytes

      protected final byte[] bfloatBytes
    • lastFloatOrd

      protected int lastFloatOrd
    • value

      protected final float[] value
    • similarityFunction

      protected final org.apache.lucene.index.VectorSimilarityFunction similarityFunction
    • flatVectorsScorer

      protected final org.apache.lucene.codecs.hnsw.FlatVectorsScorer flatVectorsScorer
  • Method Details

    • 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
    • getSlice

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

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

      public float[] vectorValue(int targetOrd) throws IOException
      Specified by:
      vectorValue in class org.apache.lucene.index.FloatVectorValues
      Throws:
      IOException
    • bfloat16VectorBytes

      public byte[] bfloat16VectorBytes(int targetOrd) throws IOException
      Description copied from class: BFloat16VectorValues
      Returns the bfloat16 vector bytes for the given ordinal.
      Specified by:
      bfloat16VectorBytes in class BFloat16VectorValues
      Throws:
      IOException