Skip to main content

write_mmap_file

Function write_mmap_file 

Source
pub fn write_mmap_file(
    path: &Path,
    postings: &[Postings],
    dim_tokens: &[u32],
    num_vectors: u32,
) -> Result<(), String>
Expand description

Write the format from in-RAM posting lists. postings[i] is the list of the dimension whose global token id is dim_tokens[i]; the file is written with its header table sorted by token id, which is what makes two files mergeable without remapping anything.

Empty dimensions are dropped rather than written: a dense table had to keep them to preserve positions, a keyed one does not.