mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-05-14 08:14:05 +02:00
cargo fmt
This commit is contained in:
parent
0f07cfed14
commit
ffe3faeca7
@ -119,12 +119,18 @@ fn test_geo_sort_with_following_ranking_rules() {
|
|||||||
|
|
||||||
let mut s = Search::new(&rtxn, &index);
|
let mut s = Search::new(&rtxn, &index);
|
||||||
s.scoring_strategy(crate::score_details::ScoringStrategy::Detailed);
|
s.scoring_strategy(crate::score_details::ScoringStrategy::Detailed);
|
||||||
s.sort_criteria(vec![AscDesc::Asc(Member::Geo([0., 0.])), AscDesc::Desc(Member::Field("score".to_string()))]);
|
s.sort_criteria(vec![
|
||||||
|
AscDesc::Asc(Member::Geo([0., 0.])),
|
||||||
|
AscDesc::Desc(Member::Field("score".to_string())),
|
||||||
|
]);
|
||||||
let (ids, scores) = execute_iterative_and_rtree_returns_the_same(&rtxn, &index, &mut s);
|
let (ids, scores) = execute_iterative_and_rtree_returns_the_same(&rtxn, &index, &mut s);
|
||||||
insta::assert_snapshot!(format!("{ids:?}"), @"[6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 4, 3, 2, 5]");
|
insta::assert_snapshot!(format!("{ids:?}"), @"[6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 4, 3, 2, 5]");
|
||||||
insta::assert_snapshot!(format!("{scores:#?}"));
|
insta::assert_snapshot!(format!("{scores:#?}"));
|
||||||
|
|
||||||
s.sort_criteria(vec![AscDesc::Desc(Member::Geo([0., 0.])), AscDesc::Desc(Member::Field("score".to_string()))]);
|
s.sort_criteria(vec![
|
||||||
|
AscDesc::Desc(Member::Geo([0., 0.])),
|
||||||
|
AscDesc::Desc(Member::Field("score".to_string())),
|
||||||
|
]);
|
||||||
let (ids, scores) = execute_iterative_and_rtree_returns_the_same(&rtxn, &index, &mut s);
|
let (ids, scores) = execute_iterative_and_rtree_returns_the_same(&rtxn, &index, &mut s);
|
||||||
insta::assert_snapshot!(format!("{ids:?}"), @"[12, 13, 14, 15, 6, 7, 8, 9, 10, 11, 1, 4, 3, 2, 5]");
|
insta::assert_snapshot!(format!("{ids:?}"), @"[12, 13, 14, 15, 6, 7, 8, 9, 10, 11, 1, 4, 3, 2, 5]");
|
||||||
insta::assert_snapshot!(format!("{scores:#?}"));
|
insta::assert_snapshot!(format!("{scores:#?}"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user