mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-02-17 00:00:11 +08:00
score_details: short circuit when the order has been established
This commit is contained in:
parent
da138deaf7
commit
3115af9baf
@ -212,8 +212,12 @@ impl ScoreDetails {
|
||||
_ => return Ok(Ordering::Equal),
|
||||
};
|
||||
for (left, right) in left.zip(right) {
|
||||
if order != Ordering::Equal {
|
||||
return Ok(order);
|
||||
};
|
||||
|
||||
index += 1;
|
||||
order = order.then(left.partial_cmp(right).incomparable(index)?);
|
||||
order = left.partial_cmp(right).incomparable(index)?;
|
||||
}
|
||||
Ok(order)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user