Expand description
Segment binary format: header, component offsets, field metadata.
A segment is a self-contained unit holding all index structures for a set of documents. The format starts with a fixed header followed by component data:
[magic: 4 bytes "MSEG"]
[segment_id: u64]
[doc_count: u32]
[max_doc: u32]
[header_checksum: u64]
[num_components: u8]
[ComponentOffset * num_components]
[num_fields: u16]
[FieldMeta * num_fields]
... component data ...See [[architecture-segment-layout]] and [[architecture-overview#Step 5]].
Structs§
- Component
Offset - Location and checksum of a component within the segment.
- Field
Meta - Per-field metadata stored in the segment header.
- Segment
Header - The segment header: fixed fields + component offsets + field metadata.
Enums§
- Component
Type - Component types stored in a segment.
Constants§
- FLAG_
DOC_ VALUES - FLAG_
INDEXED - FLAG_
NORMS - FLAG_
STORED - Field flags packed into a single byte.
- SEGMENT_
MAGIC - Magic bytes at the start of every segment.