mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-21 12:16:26 +00:00
Add new tests and fix construction of query graph from paths
This commit is contained in:
@ -3,6 +3,8 @@ This module tests the interactions between the proximity and typo ranking rules.
|
||||
|
||||
The proximity ranking rule should transform the query graph such that it
|
||||
only contains the word pairs that it used to compute its bucket.
|
||||
|
||||
TODO: This is not currently implemented.
|
||||
*/
|
||||
|
||||
use crate::{
|
||||
@ -61,8 +63,13 @@ fn test_trap_basic() {
|
||||
s.terms_matching_strategy(TermsMatchingStrategy::All);
|
||||
s.query("summer holiday");
|
||||
let SearchResult { documents_ids, .. } = s.execute().unwrap();
|
||||
insta::assert_snapshot!(format!("{documents_ids:?}"), @"[1, 0, 3, 2]");
|
||||
insta::assert_snapshot!(format!("{documents_ids:?}"), @"[0, 1]");
|
||||
let texts = collect_field_values(&index, &txn, "text", &documents_ids);
|
||||
// TODO: this is incorrect, 1 should come before 0
|
||||
insta::assert_debug_snapshot!(texts, @r###"
|
||||
[
|
||||
"\"summer. holiday. sommer holidty\"",
|
||||
"\"summer. holiday. sommer holiday\"",
|
||||
]
|
||||
"###);
|
||||
}
|
||||
|
Reference in New Issue
Block a user