mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-12 16:08:55 +01:00
add test normalize exact words
This commit is contained in:
parent
c7d0097c97
commit
3a2451fcba
@ -1461,4 +1461,22 @@ mod tests {
|
||||
builder.set_min_word_len_two_typos(7);
|
||||
assert!(builder.execute(|_| ()).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn update_exact_words_normalization() {
|
||||
let index = TempIndex::new();
|
||||
let config = IndexerConfig::default();
|
||||
|
||||
// Set the genres setting
|
||||
let mut txn = index.write_txn().unwrap();
|
||||
let mut builder = Settings::new(&mut txn, &index, &config);
|
||||
|
||||
let words = btreeset! { S("Ab"), S("ac") };
|
||||
builder.set_exact_words(words);
|
||||
assert!(builder.execute(|_| ()).is_ok());
|
||||
let exact_words = index.exact_words(&txn).unwrap();
|
||||
for word in exact_words.into_fst().stream().into_str_vec().unwrap() {
|
||||
assert!(word.0 == "ac" || word.0 == "ab");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user