mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-10-11 14:16:31 +00:00
Fix the tests
This commit is contained in:
@@ -147,6 +147,15 @@ pub fn expected_order(
|
||||
new_groups
|
||||
.extend(group.linear_group_by_key(|d| d.asc_desc_rank).map(Vec::from));
|
||||
}
|
||||
RankingRule::Boost(filter) => {
|
||||
// move the matching documents first, then the ones that don't match
|
||||
group.sort_by_key(|d| if execute_filter(filter, d).is_some() { 0 } else { 1 });
|
||||
new_groups.extend(
|
||||
group
|
||||
.linear_group_by_key(|d| execute_filter(filter, d).is_some())
|
||||
.map(Vec::from),
|
||||
);
|
||||
}
|
||||
RankingRule::Asc(_) | RankingRule::Desc(_) | RankingRule::Sort => {
|
||||
new_groups.push(group.clone())
|
||||
}
|
||||
|
Reference in New Issue
Block a user