Skip to content

Each index in a table definition is:

index_id u32 LE ‖ str name ‖ u8 (unique | kind << 1) ‖ varint ncols ‖ varint column*
Field Encoding Meaning
index_id u32 LE the id used in index and posting keys
name str the index name
flags u8 bit 0 is unique; the remaining bits hold kind shifted left by 1
ncols varint number of columns
column varint, repeated the indexed columns
Value Kind Keys
0 B-tree Index entries (0x02 and 0x03)
1 trigram Posting keys (0x04)
2 full-text Posting keys (0x05)
3 JSON Index entries (0x06)

Included columns, descending parts and the building flag are in Ext I, Ext D and Ext S.