Class ES816BinaryQuantizedVectorsReader

java.lang.Object
org.apache.lucene.codecs.KnnVectorsReader
org.apache.lucene.codecs.hnsw.FlatVectorsReader
org.elasticsearch.index.codec.vectors.es816.ES816BinaryQuantizedVectorsReader
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.lucene.util.Accountable

public class ES816BinaryQuantizedVectorsReader extends org.apache.lucene.codecs.hnsw.FlatVectorsReader
Copied from Lucene, replace with Lucene's implementation sometime after Lucene 10
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static final class 
    Binarized vector values holding row and quantized vector values
  • Field Summary

    Fields inherited from interface org.apache.lucene.util.Accountable

    NULL_ACCOUNTABLE
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    org.apache.lucene.index.ByteVectorValues
     
    float[]
     
    org.apache.lucene.index.FloatVectorValues
     
    getOffHeapByteSize(org.apache.lucene.index.FieldInfo fieldInfo)
     
    org.apache.lucene.util.hnsw.RandomVectorScorer
    getRandomVectorScorer(String field, byte[] target)
     
    org.apache.lucene.util.hnsw.RandomVectorScorer
    getRandomVectorScorer(String field, float[] target)
     
    long
     
    void
    search(String field, byte[] target, org.apache.lucene.search.KnnCollector knnCollector, org.apache.lucene.search.AcceptDocs acceptDocs)
     
    void
    search(String field, float[] target, org.apache.lucene.search.KnnCollector knnCollector, org.apache.lucene.search.AcceptDocs acceptDocs)
     

    Methods inherited from class org.apache.lucene.codecs.hnsw.FlatVectorsReader

    getFlatVectorScorer, getMergeInstance

    Methods inherited from class org.apache.lucene.codecs.KnnVectorsReader

    finishMerge, mergeOffHeapByteSizeMaps

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.lucene.util.Accountable

    getChildResources
  • Method Details

    • getRandomVectorScorer

      public org.apache.lucene.util.hnsw.RandomVectorScorer getRandomVectorScorer(String field, float[] target) throws IOException
      Specified by:
      getRandomVectorScorer in class org.apache.lucene.codecs.hnsw.FlatVectorsReader
      Throws:
      IOException
    • getRandomVectorScorer

      public org.apache.lucene.util.hnsw.RandomVectorScorer getRandomVectorScorer(String field, byte[] target) throws IOException
      Specified by:
      getRandomVectorScorer in class org.apache.lucene.codecs.hnsw.FlatVectorsReader
      Throws:
      IOException
    • checkIntegrity

      public void checkIntegrity() throws IOException
      Specified by:
      checkIntegrity in class org.apache.lucene.codecs.KnnVectorsReader
      Throws:
      IOException
    • getFloatVectorValues

      public org.apache.lucene.index.FloatVectorValues getFloatVectorValues(String field) throws IOException
      Specified by:
      getFloatVectorValues in class org.apache.lucene.codecs.KnnVectorsReader
      Throws:
      IOException
    • getByteVectorValues

      public org.apache.lucene.index.ByteVectorValues getByteVectorValues(String field) throws IOException
      Specified by:
      getByteVectorValues in class org.apache.lucene.codecs.KnnVectorsReader
      Throws:
      IOException
    • search

      public void search(String field, byte[] target, org.apache.lucene.search.KnnCollector knnCollector, org.apache.lucene.search.AcceptDocs acceptDocs) throws IOException
      Overrides:
      search in class org.apache.lucene.codecs.hnsw.FlatVectorsReader
      Throws:
      IOException
    • search

      public void search(String field, float[] target, org.apache.lucene.search.KnnCollector knnCollector, org.apache.lucene.search.AcceptDocs acceptDocs) throws IOException
      Overrides:
      search in class org.apache.lucene.codecs.hnsw.FlatVectorsReader
      Throws:
      IOException
    • close

      public void close() throws IOException
      Throws:
      IOException
    • ramBytesUsed

      public long ramBytesUsed()
    • getOffHeapByteSize

      public Map<String,Long> getOffHeapByteSize(org.apache.lucene.index.FieldInfo fieldInfo)
      Overrides:
      getOffHeapByteSize in class org.apache.lucene.codecs.KnnVectorsReader
    • getCentroid

      public float[] getCentroid(String field)