Class VarByteChunkForwardIndexWriter

  • All Implemented Interfaces:
    Closeable, AutoCloseable, VarByteChunkWriter

    @NotThreadSafe
    public class VarByteChunkForwardIndexWriter
    extends BaseChunkForwardIndexWriter
    implements VarByteChunkWriter
    Chunk-based raw (non-dictionary-encoded) forward index writer where each chunk contains fixed number of docs, and the entries are variable length.

    The layout of each chunk is as follows:

    • Header Section: start offsets (stored as int) of the entry within the data section. For partial chunks, offset values are 0 for missing entries.
    • Data Section
    • Field Detail

      • CHUNK_HEADER_ENTRY_ROW_OFFSET_SIZE

        public static final int CHUNK_HEADER_ENTRY_ROW_OFFSET_SIZE
        See Also:
        Constant Field Values
    • Constructor Detail

      • VarByteChunkForwardIndexWriter

        public VarByteChunkForwardIndexWriter​(File file,
                                              ChunkCompressionType compressionType,
                                              int totalDocs,
                                              int numDocsPerChunk,
                                              int lengthOfLongestEntry,
                                              int writerVersion)
                                       throws IOException
        Constructor for the class.
        Parameters:
        file - File to write to.
        compressionType - Type of compression to use.
        totalDocs - Total number of docs to write.
        numDocsPerChunk - Number of documents per chunk.
        lengthOfLongestEntry - Length of longest entry (in bytes)
        writerVersion - writer format version
        Throws:
        FileNotFoundException - Throws FileNotFoundException if the specified file is not found.
        IOException