mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-06-10 01:51:36 +02:00
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:
parent
5b67de0367
commit
161cb736ea
@ -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("化妆包");
|
||||
|
Loading…
x
Reference in New Issue
Block a user