mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
Fix #5274
This commit is contained in:
parent
7ae9a4afee
commit
dedae94102
3 changed files with 9 additions and 1 deletions
|
@ -236,6 +236,7 @@ impl<'a> Search<'a> {
|
|||
&mut ctx,
|
||||
vector,
|
||||
self.scoring_strategy,
|
||||
self.exhaustive_number_hits,
|
||||
universe,
|
||||
&self.sort_criteria,
|
||||
&self.distinct,
|
||||
|
|
|
@ -32,6 +32,7 @@ pub fn bucket_sort<'ctx, Q: RankingRuleQueryTrait>(
|
|||
logger: &mut dyn SearchLogger<Q>,
|
||||
time_budget: TimeBudget,
|
||||
ranking_score_threshold: Option<f64>,
|
||||
exhaustive_number_hits: bool,
|
||||
) -> Result<BucketSortOutput> {
|
||||
logger.initial_query(query);
|
||||
logger.ranking_rules(&ranking_rules);
|
||||
|
@ -159,7 +160,9 @@ pub fn bucket_sort<'ctx, Q: RankingRuleQueryTrait>(
|
|||
};
|
||||
}
|
||||
|
||||
while valid_docids.len() < length {
|
||||
while valid_docids.len() < length
|
||||
|| (exhaustive_number_hits && ranking_score_threshold.is_some())
|
||||
{
|
||||
if time_budget.exceeded() {
|
||||
loop {
|
||||
let bucket = std::mem::take(&mut ranking_rule_universes[cur_ranking_rule_index]);
|
||||
|
|
|
@ -626,6 +626,7 @@ pub fn execute_vector_search(
|
|||
ctx: &mut SearchContext<'_>,
|
||||
vector: &[f32],
|
||||
scoring_strategy: ScoringStrategy,
|
||||
exhaustive_number_hits: bool,
|
||||
universe: RoaringBitmap,
|
||||
sort_criteria: &Option<Vec<AscDesc>>,
|
||||
distinct: &Option<String>,
|
||||
|
@ -669,6 +670,7 @@ pub fn execute_vector_search(
|
|||
placeholder_search_logger,
|
||||
time_budget,
|
||||
ranking_score_threshold,
|
||||
exhaustive_number_hits,
|
||||
)?;
|
||||
|
||||
Ok(PartialSearchResult {
|
||||
|
@ -825,6 +827,7 @@ pub fn execute_search(
|
|||
query_graph_logger,
|
||||
time_budget,
|
||||
ranking_score_threshold,
|
||||
exhaustive_number_hits,
|
||||
)?
|
||||
} else {
|
||||
let ranking_rules =
|
||||
|
@ -841,6 +844,7 @@ pub fn execute_search(
|
|||
placeholder_search_logger,
|
||||
time_budget,
|
||||
ranking_score_threshold,
|
||||
exhaustive_number_hits,
|
||||
)?
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue