mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 00:31:02 +00:00
Apply review suggestions
Co-Authored-By: Louis Dureuil <louis.dureuil@xinra.net>
This commit is contained in:
@ -161,12 +161,13 @@ pub fn bucket_sort<'ctx, Q: RankingRuleQueryTrait>(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
let max_total_hits = max_total_hits.unwrap_or(usize::MAX);
|
let max_len_to_evaluate =
|
||||||
while valid_docids.len() < length
|
match (max_total_hits, exhaustive_number_hits && ranking_score_threshold.is_some()) {
|
||||||
|| (exhaustive_number_hits
|
(Some(max_total_hits), true) => max_total_hits,
|
||||||
&& ranking_score_threshold.is_some()
|
_ => length,
|
||||||
&& valid_docids.len() < max_total_hits)
|
};
|
||||||
{
|
|
||||||
|
while valid_docids.len() < max_len_to_evaluate {
|
||||||
if time_budget.exceeded() {
|
if time_budget.exceeded() {
|
||||||
loop {
|
loop {
|
||||||
let bucket = std::mem::take(&mut ranking_rule_universes[cur_ranking_rule_index]);
|
let bucket = std::mem::take(&mut ranking_rule_universes[cur_ranking_rule_index]);
|
||||||
|
Reference in New Issue
Block a user