mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Make sure that automatons group with more automatons are better
This commit is contained in:
parent
44c89b1ea2
commit
cb5c77e536
2 changed files with 6 additions and 5 deletions
|
@ -284,7 +284,11 @@ fn generate_automatons(
|
|||
// we keep the original automatons at the front.
|
||||
automatons[1..].sort_by_key(|group| {
|
||||
let a = group.automatons.first().unwrap();
|
||||
(Reverse(a.is_exact), a.ngram)
|
||||
(
|
||||
Reverse(a.is_exact),
|
||||
a.ngram,
|
||||
Reverse(group.automatons.len()),
|
||||
)
|
||||
});
|
||||
|
||||
Ok((automatons, enhancer_builder.build()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue