mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-24 13:40:31 +01:00
Clean up the warnings for prefix postings
This commit is contained in:
parent
ba3e805981
commit
a044cb6cc8
@ -243,9 +243,9 @@ fn index_csv(mut rdr: csv::Reader<File>) -> anyhow::Result<MtblKvStore> {
|
|||||||
|
|
||||||
let mut document = csv::StringRecord::new();
|
let mut document = csv::StringRecord::new();
|
||||||
let mut postings_attrs = FastMap4::default();
|
let mut postings_attrs = FastMap4::default();
|
||||||
let mut prefix_postings_attrs = FastMap4::default();
|
let prefix_postings_attrs = FastMap4::default();
|
||||||
let mut postings_ids = FastMap4::default();
|
let mut postings_ids = FastMap4::default();
|
||||||
let mut prefix_postings_ids = FastMap4::default();
|
let prefix_postings_ids = FastMap4::default();
|
||||||
let mut documents = Vec::new();
|
let mut documents = Vec::new();
|
||||||
|
|
||||||
// Write the headers into a Vec of bytes.
|
// Write the headers into a Vec of bytes.
|
||||||
@ -272,18 +272,6 @@ fn index_csv(mut rdr: csv::Reader<File>) -> anyhow::Result<MtblKvStore> {
|
|||||||
postings_ids.entry(SmallVec32::from(word.as_bytes()))
|
postings_ids.entry(SmallVec32::from(word.as_bytes()))
|
||||||
.or_insert_with(FastMap4::default).entry(position) // positions
|
.or_insert_with(FastMap4::default).entry(position) // positions
|
||||||
.or_insert_with(RoaringBitmap::new).insert(document_id); // document ids
|
.or_insert_with(RoaringBitmap::new).insert(document_id); // document ids
|
||||||
|
|
||||||
// // We save the documents ids under the position and prefix of the word we have seen it.
|
|
||||||
// if let Some(prefix) = word.as_bytes().get(0..word.len().min(5)) {
|
|
||||||
// for i in 1..=prefix.len() {
|
|
||||||
// prefix_postings_attrs.entry(SmallVec32::from(&prefix[..i]))
|
|
||||||
// .or_insert_with(RoaringBitmap::new).insert(position);
|
|
||||||
|
|
||||||
// prefix_postings_ids.entry(SmallVec32::from(&prefix[..i]))
|
|
||||||
// .or_insert_with(FastMap4::default).entry(position) // positions
|
|
||||||
// .or_insert_with(RoaringBitmap::new).insert(document_id); // document ids
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user