Adapt tests to the Chinese word segmenter changes

The new Chinese segmenter is splitting words in smaller parts.
The words `小化妆包` was previously seegmented as `小 / 化妆包` and is now segmented as `小 / 化妆 / 包`,
which changes the tests results.
This commit is contained in:
ManyTheFish 2025-06-03 10:37:29 +02:00
parent 5b67de0367
commit 161cb736ea

View File

@ -1580,12 +1580,12 @@ mod tests {
let rtxn = index.read_txn().unwrap();
// Only the first document should match.
let count = index.word_docids.get(&rtxn, "huàzhuāngbāo").unwrap().unwrap().len();
let count = index.word_docids.get(&rtxn, "huàzhuāng").unwrap().unwrap().len();
assert_eq!(count, 1);
// Only the second document should match.
let count = index.word_docids.get(&rtxn, "bāo").unwrap().unwrap().len();
assert_eq!(count, 1);
assert_eq!(count, 2);
let mut search = crate::Search::new(&rtxn, &index);
search.query("化妆包");