mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 12:05:05 +08:00
Add test mixing phrased and no-phrased words
This commit is contained in:
parent
97a04887a3
commit
a38608fe59
@ -1058,6 +1058,26 @@ mod test {
|
||||
"###);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn phrase_2() {
|
||||
// https://github.com/meilisearch/meilisearch/issues/2722
|
||||
let query = "coco \"harry\"";
|
||||
let tokens = query.tokenize();
|
||||
|
||||
let (query_tree, _) = TestContext::default()
|
||||
.build(TermsMatchingStrategy::default(), true, None, tokens)
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
|
||||
insta::assert_debug_snapshot!(query_tree, @r###"
|
||||
OR(WORD)
|
||||
Exact { word: "harry" }
|
||||
AND
|
||||
Exact { word: "coco" }
|
||||
Exact { word: "harry" }
|
||||
"###);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn phrase_with_hard_separator() {
|
||||
let query = "\"hey friends. wooop wooop\"";
|
||||
|
Loading…
Reference in New Issue
Block a user