Remove the docid_word_positions_merge method that must never be called

This commit is contained in:
Kerollmops 2021-06-09 14:49:06 +02:00
parent 93a8633f18
commit ab727e428b
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
2 changed files with 3 additions and 8 deletions

View File

@ -18,10 +18,6 @@ pub fn fst_merge(_key: &[u8], values: &[Cow<[u8]>]) -> anyhow::Result<Vec<u8>> {
Ok(build.into_inner().unwrap())
}
pub fn docid_word_positions_merge(key: &[u8], _values: &[Cow<[u8]>]) -> anyhow::Result<Vec<u8>> {
panic!("merging docid word positions is an error ({:?})", key.as_bstr())
}
pub fn keep_first(_key: &[u8], values: &[Cow<[u8]>]) -> anyhow::Result<Vec<u8>> {
Ok(values.first().unwrap().to_vec())
}

View File

@ -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
)?;