diff --git a/milli/src/update/index_documents/merge_function.rs b/milli/src/update/index_documents/merge_function.rs index 904368fb0..0a32603b5 100644 --- a/milli/src/update/index_documents/merge_function.rs +++ b/milli/src/update/index_documents/merge_function.rs @@ -18,10 +18,6 @@ pub fn fst_merge(_key: &[u8], values: &[Cow<[u8]>]) -> anyhow::Result> { Ok(build.into_inner().unwrap()) } -pub fn docid_word_positions_merge(key: &[u8], _values: &[Cow<[u8]>]) -> anyhow::Result> { - panic!("merging docid word positions is an error ({:?})", key.as_bstr()) -} - pub fn keep_first(_key: &[u8], values: &[Cow<[u8]>]) -> anyhow::Result> { Ok(values.first().unwrap().to_vec()) } diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index 7fb47fa4a..1d31cba85 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -25,8 +25,7 @@ use crate::update::{ }; use self::store::{Store, Readers}; pub use self::merge_function::{ - fst_merge, cbo_roaring_bitmap_merge, roaring_bitmap_merge, - docid_word_positions_merge, keep_first + fst_merge, cbo_roaring_bitmap_merge, roaring_bitmap_merge, keep_first }; pub use self::transform::{Transform, TransformOutput}; @@ -619,12 +618,12 @@ impl<'t, 'u, 'i, 'a> IndexDocuments<'t, 'u, 'i, 'a> { total_databases, }); - debug!("Writing the docid word positions into LMDB on disk..."); + debug!("Inserting the docid word positions into LMDB on disk..."); merge_into_lmdb_database( self.wtxn, *self.index.docid_word_positions.as_polymorph(), docid_word_positions_readers, - docid_word_positions_merge, + keep_first, write_method )?;