Module org.elasticsearch.server
Class DiskBBQBulkWriter
java.lang.Object
org.elasticsearch.index.codec.vectors.diskbbq.DiskBBQBulkWriter
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 Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDiskBBQBulkWriter(int bulkSize, org.apache.lucene.store.IndexOutput out) -
Method Summary
Modifier and TypeMethodDescriptionstatic DiskBBQBulkWriterfromBitSize(int bitSize, int bulkSize, org.apache.lucene.store.IndexOutput out) Factory method to create a DiskBBQBulkWriter based on the bit size.abstract voidwriteVectors(QuantizedVectorValues qvv, org.apache.lucene.search.CheckedIntConsumer<IOException> docsWriter)
-
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 vectorsbulkSize- the number of vectors to write in bulkout- the IndexOutput to write to- Returns:
- a DiskBBQBulkWriter instance
-