The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

A doc_map is used when consolidating a segment. It's a C array of U32 (stored in a scalar) where the offset from the start represents the original doc_num, and the value represents the new doc_num. _get_doc_map maps around deleted docs, hence the name: if doc 2 is deleted, the map will be 0, 1, -1, 2, 3...