Fix wod pair proximity error when nothing has to be extracted

This commit is contained in:
ManyTheFish 2024-04-15 11:28:30 +02:00
parent 5ab901dd30
commit eaf113ef34

View File

@ -32,11 +32,12 @@ pub fn extract_word_pair_proximity_docids<R: io::Read + io::Seek>(
// early return if the data shouldn't be deleted nor created. // early return if the data shouldn't be deleted nor created.
if !any_deletion && !any_addition { if !any_deletion && !any_addition {
return tempfile::tempfile() let writer = create_writer(
.map_err(Into::into) indexer.chunk_compression_type,
.map(BufReader::new) indexer.chunk_compression_level,
.and_then(grenad::Reader::new) tempfile::tempfile()?,
.map_err(Into::into); );
return writer_into_reader(writer);
} }
let max_memory = indexer.max_memory_by_thread(); let max_memory = indexer.max_memory_by_thread();