mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
replace optional_words by term_matching_strategy
This commit is contained in:
parent
f9029727e0
commit
5391e3842c
9 changed files with 46 additions and 39 deletions
|
@ -1208,7 +1208,7 @@ mod tests {
|
|||
let mut search = crate::Search::new(&rtxn, &index);
|
||||
search.query("document");
|
||||
search.authorize_typos(true);
|
||||
search.optional_words(TermsMatchingStrategy::default());
|
||||
search.terms_matching_strategy(TermsMatchingStrategy::default());
|
||||
// all documents should be returned
|
||||
let crate::SearchResult { documents_ids, .. } = search.execute().unwrap();
|
||||
assert_eq!(documents_ids.len(), 4);
|
||||
|
@ -1314,7 +1314,7 @@ mod tests {
|
|||
let mut search = crate::Search::new(&rtxn, &index);
|
||||
search.query("document");
|
||||
search.authorize_typos(true);
|
||||
search.optional_words(TermsMatchingStrategy::default());
|
||||
search.terms_matching_strategy(TermsMatchingStrategy::default());
|
||||
// all documents should be returned
|
||||
let crate::SearchResult { documents_ids, .. } = search.execute().unwrap();
|
||||
assert_eq!(documents_ids.len(), 4);
|
||||
|
@ -1513,7 +1513,7 @@ mod tests {
|
|||
let mut search = crate::Search::new(&rtxn, &index);
|
||||
search.query("化妆包");
|
||||
search.authorize_typos(true);
|
||||
search.optional_words(TermsMatchingStrategy::default());
|
||||
search.terms_matching_strategy(TermsMatchingStrategy::default());
|
||||
|
||||
// only 1 document should be returned
|
||||
let crate::SearchResult { documents_ids, .. } = search.execute().unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue