mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-15 13:58:36 +02:00
test a new implementation of the stop_words
This commit is contained in:
parent
da036dcc3e
commit
dcb00b2e54
3 changed files with 25 additions and 13 deletions
|
@ -602,12 +602,13 @@ mod tests {
|
|||
assert_eq!(stop_words.as_fst().as_bytes(), expected.as_fst().as_bytes());
|
||||
|
||||
// when we search for something that is a non prefix stop_words it should be ignored
|
||||
// thus we should get a placeholder search (all the results = 3)
|
||||
let result = index.search(&rtxn).query("the ").execute().unwrap();
|
||||
assert!(result.documents_ids.is_empty());
|
||||
assert_eq!(result.documents_ids.len(), 3);
|
||||
let result = index.search(&rtxn).query("i ").execute().unwrap();
|
||||
assert!(result.documents_ids.is_empty());
|
||||
assert_eq!(result.documents_ids.len(), 3);
|
||||
let result = index.search(&rtxn).query("are ").execute().unwrap();
|
||||
assert!(result.documents_ids.is_empty());
|
||||
assert_eq!(result.documents_ids.len(), 3);
|
||||
|
||||
let result = index.search(&rtxn).query("dog").execute().unwrap();
|
||||
assert_eq!(result.documents_ids.len(), 2); // we have two maxims talking about doggos
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue