Optimize roaring operation

Co-authored-by: Many the fish <many@meilisearch.com>
This commit is contained in:
Louis Dureuil 2025-04-01 14:25:27 +02:00 committed by GitHub
parent f9807ba32e
commit 0656a0d515
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -252,8 +252,8 @@ pub fn bucket_sort<'ctx, Q: RankingRuleQueryTrait>(
|| is_below_threshold || is_below_threshold
{ {
if is_below_threshold { if is_below_threshold {
all_candidates -= all_candidates -= &next_bucket.candidates;
next_bucket.candidates | &ranking_rule_universes[cur_ranking_rule_index]; all_candidates -= &ranking_rule_universes[cur_ranking_rule_index];
} else { } else {
maybe_add_to_results!(next_bucket.candidates); maybe_add_to_results!(next_bucket.candidates);
} }