mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
Update tests
This commit is contained in:
parent
b40253bf18
commit
94206b0055
@ -423,20 +423,20 @@ fn test_proximity_prefix_db() {
|
|||||||
s.scoring_strategy(crate::score_details::ScoringStrategy::Detailed);
|
s.scoring_strategy(crate::score_details::ScoringStrategy::Detailed);
|
||||||
s.query("best win");
|
s.query("best win");
|
||||||
let SearchResult { documents_ids, document_scores, .. } = s.execute().unwrap();
|
let SearchResult { documents_ids, document_scores, .. } = s.execute().unwrap();
|
||||||
insta::assert_snapshot!(format!("{documents_ids:?}"), @"[15, 16, 17, 18, 19, 20, 21, 22]");
|
insta::assert_snapshot!(format!("{documents_ids:?}"), @"[19, 22, 18, 21, 15, 16, 17, 20]");
|
||||||
insta::assert_snapshot!(format!("{document_scores:#?}"));
|
insta::assert_snapshot!(format!("{document_scores:#?}"));
|
||||||
let texts = collect_field_values(&index, &txn, "text", &documents_ids);
|
let texts = collect_field_values(&index, &txn, "text", &documents_ids);
|
||||||
|
|
||||||
insta::assert_debug_snapshot!(texts, @r###"
|
insta::assert_debug_snapshot!(texts, @r###"
|
||||||
[
|
[
|
||||||
|
"\"this is the best winter meal\"",
|
||||||
|
"\"winter best\"",
|
||||||
|
"\"this is the best meal of winter\"",
|
||||||
|
"\"winter x best\"",
|
||||||
"\"this is the best meal I have ever had in such a beautiful winter day\"",
|
"\"this is the best meal I have ever had in such a beautiful winter day\"",
|
||||||
"\"this is the best cooked meal of the winter\"",
|
"\"this is the best cooked meal of the winter\"",
|
||||||
"\"this is the best meal of the winter\"",
|
"\"this is the best meal of the winter\"",
|
||||||
"\"this is the best meal of winter\"",
|
|
||||||
"\"this is the best winter meal\"",
|
|
||||||
"\"winter x y best\"",
|
"\"winter x y best\"",
|
||||||
"\"winter x best\"",
|
|
||||||
"\"winter best\"",
|
|
||||||
]
|
]
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ expression: "format!(\"{document_scores:#?}\")"
|
|||||||
[
|
[
|
||||||
Proximity(
|
Proximity(
|
||||||
Rank {
|
Rank {
|
||||||
rank: 1,
|
rank: 4,
|
||||||
max_rank: 4,
|
max_rank: 4,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -14,7 +14,7 @@ expression: "format!(\"{document_scores:#?}\")"
|
|||||||
[
|
[
|
||||||
Proximity(
|
Proximity(
|
||||||
Rank {
|
Rank {
|
||||||
rank: 1,
|
rank: 3,
|
||||||
max_rank: 4,
|
max_rank: 4,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -22,7 +22,7 @@ expression: "format!(\"{document_scores:#?}\")"
|
|||||||
[
|
[
|
||||||
Proximity(
|
Proximity(
|
||||||
Rank {
|
Rank {
|
||||||
rank: 1,
|
rank: 2,
|
||||||
max_rank: 4,
|
max_rank: 4,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -30,7 +30,7 @@ expression: "format!(\"{document_scores:#?}\")"
|
|||||||
[
|
[
|
||||||
Proximity(
|
Proximity(
|
||||||
Rank {
|
Rank {
|
||||||
rank: 1,
|
rank: 2,
|
||||||
max_rank: 4,
|
max_rank: 4,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user