limit extract_word_docids memory usage

This commit is contained in:
ad hoc 2022-04-05 14:14:15 +02:00
parent 5cfd3d8407
commit 201fea0fda
No known key found for this signature in database
GPG Key ID: 4F00A782990CC643
2 changed files with 3 additions and 2 deletions

View File

@ -502,6 +502,7 @@ fn remove_from_word_docids(
}
}
}
Ok(())
}

View File

@ -34,7 +34,7 @@ pub fn extract_word_docids<R: io::Read + io::Seek>(
indexer.chunk_compression_type,
indexer.chunk_compression_level,
indexer.max_nb_chunks,
max_memory,
max_memory.map(|x| x / 2),
);
let mut exact_word_docids_sorter = create_sorter(
@ -42,7 +42,7 @@ pub fn extract_word_docids<R: io::Read + io::Seek>(
indexer.chunk_compression_type,
indexer.chunk_compression_level,
indexer.max_nb_chunks,
max_memory,
max_memory.map(|x| x / 2),
);
let mut value_buffer = Vec::new();