Start with a filterBoosting ranking rule when boostingFilter is present

This commit is contained in:
Clément Renault 2023-11-28 16:09:51 +01:00
parent f2041fd78c
commit b43edabbcd
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
13 changed files with 80 additions and 109 deletions

View file

@ -147,7 +147,7 @@ pub fn expected_order(
new_groups
.extend(group.linear_group_by_key(|d| d.asc_desc_rank).map(Vec::from));
}
RankingRule::Boost(filter) => {
RankingRule::FilterBoosting(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(