Class ES940DiskBBQVectorsReader

java.lang.Object
org.apache.lucene.codecs.KnnVectorsReader
org.elasticsearch.index.codec.vectors.diskbbq.IVFVectorsReader<org.elasticsearch.index.codec.vectors.diskbbq.es94.ES940DiskBBQVectorsReader.NextFieldEntry>
org.elasticsearch.index.codec.vectors.diskbbq.es94.ES940DiskBBQVectorsReader
All Implemented Interfaces:
Closeable, AutoCloseable, VectorPreconditioner

public class ES940DiskBBQVectorsReader extends IVFVectorsReader<org.elasticsearch.index.codec.vectors.diskbbq.es94.ES940DiskBBQVectorsReader.NextFieldEntry> implements VectorPreconditioner
Default implementation of IVFVectorsReader. It scores the posting lists centroids using brute force and then scores the top ones using the posting list.
  • Constructor Details

  • Method Details

    • getCentroidIterator

      public CentroidIterator getCentroidIterator(org.apache.lucene.index.FieldInfo fieldInfo, int numCentroids, org.apache.lucene.store.IndexInput centroids, float[] targetQuery, org.apache.lucene.store.IndexInput postingListSlice, org.apache.lucene.search.AcceptDocs acceptDocs, float approximateCost, org.apache.lucene.index.FloatVectorValues values, float visitRatio) throws IOException
      Specified by:
      getCentroidIterator in class IVFVectorsReader<org.elasticsearch.index.codec.vectors.diskbbq.es94.ES940DiskBBQVectorsReader.NextFieldEntry>
      Throws:
      IOException
    • doReadField

      protected org.elasticsearch.index.codec.vectors.diskbbq.es94.ES940DiskBBQVectorsReader.NextFieldEntry doReadField(org.apache.lucene.store.IndexInput input, String rawVectorFormat, boolean useDirectIOReads, org.apache.lucene.index.VectorSimilarityFunction similarityFunction, org.apache.lucene.index.VectorEncoding vectorEncoding, int numCentroids, long centroidOffset, long centroidLength, long postingListOffset, long postingListLength, float[] globalCentroid, float globalCentroidDp) throws IOException
      Specified by:
      doReadField in class IVFVectorsReader<org.elasticsearch.index.codec.vectors.diskbbq.es94.ES940DiskBBQVectorsReader.NextFieldEntry>
      Throws:
      IOException
    • getPreconditioner

      public Preconditioner getPreconditioner(org.apache.lucene.index.FieldInfo fieldInfo) throws IOException
      Specified by:
      getPreconditioner in interface VectorPreconditioner
      Throws:
      IOException
    • getPostingVisitor

      public IVFVectorsReader.PostingVisitor getPostingVisitor(org.apache.lucene.index.FieldInfo fieldInfo, int numVectors, org.apache.lucene.store.IndexInput indexInput, float[] target, org.apache.lucene.util.Bits acceptDocs, org.apache.lucene.store.IndexInput centroidSlice) throws IOException
      Specified by:
      getPostingVisitor in class IVFVectorsReader<org.elasticsearch.index.codec.vectors.diskbbq.es94.ES940DiskBBQVectorsReader.NextFieldEntry>
      Throws:
      IOException
    • getOffHeapByteSize

      public Map<String,Long> getOffHeapByteSize(org.apache.lucene.index.FieldInfo fieldInfo)
      Overrides:
      getOffHeapByteSize in class IVFVectorsReader<org.elasticsearch.index.codec.vectors.diskbbq.es94.ES940DiskBBQVectorsReader.NextFieldEntry>