Marvin Humphrey
and 1 contributors

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...