java.lang.Object
org.elasticsearch.index.codec.vectors.diskbbq.DiskBBQBulkWriter

public abstract sealed class DiskBBQBulkWriter extends Object
Base class for bulk writers that write vectors to disk using the BBQ encoding. This class provides the structure for writing vectors in bulk, with specific implementations for different bit sizes strategies.
  • Field Details

    • bulkSize

      protected final int bulkSize
    • out

      protected final org.apache.lucene.store.IndexOutput out
  • Constructor Details

    • DiskBBQBulkWriter

      protected DiskBBQBulkWriter(int bulkSize, org.apache.lucene.store.IndexOutput out)
  • Method Details

    • writeVectors

      public abstract void writeVectors(QuantizedVectorValues qvv, org.apache.lucene.search.CheckedIntConsumer<IOException> docsWriter) throws IOException
      Throws:
      IOException
    • fromBitSize

      public static DiskBBQBulkWriter fromBitSize(int bitSize, int bulkSize, org.apache.lucene.store.IndexOutput out)
      Factory method to create a DiskBBQBulkWriter based on the bit size.
      Parameters:
      bitSize - the bit size of the quantized vectors
      bulkSize - the number of vectors to write in bulk
      out - the IndexOutput to write to
      Returns:
      a DiskBBQBulkWriter instance