Posting revision 5: 0xE5
Revision 5 is the newest posting block revision. It carries full-text term positions by wrapping an inner block that holds the keys, term frequencies and lengths.
SEAM 1 writers produce this revision only at store format 4 or higher, only for full-text term lists (nvars 2) where at least one entry has positions, and only when the result is not larger than the plain revision 2 block.
How a reader recognizes it
Section titled “How a reader recognizes it”The value starts with 0x00 and the next byte is 0xE5. See Block head.
Layout
Section titled “Layout”After the common head:
| Field | Encoding | Meaning |
|---|---|---|
inner_len |
varint | length of the inner block |
| inner block | inner_len bytes |
a complete marked block (with its own head) of revision 2, 3 or 4 holding (key, tf, len); its n must equal the outer n |
| presence bitmap | ceil(n/8) bytes |
bit i % 8 of byte i / 8 (LSB-first) is set when entry i has positions |
| positions | varints | for each entry whose bit is set, in entry order, its tf position varints; the block must end exactly after the last one |
The positions of one entry follow the rule in Posting payloads: tf varints, the first absolute, the rest deltas greater than 0, each less than len. Positions are optional (SPEC V734).
What it adds over revision 4
Section titled “What it adds over revision 4”Positions. Revisions 2 to 4 keep only the key and payload variables; revision 5 adds the optional position lists (SPEC V734).
Newer revisions
Section titled “Newer revisions”Marker bytes 0xE6 to 0xEF fail with NewerFormat and the message posting block format N is newer than this build supports (229); upgrade strata.