mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-27 12:35:05 +08:00
Improve the automaton producer quality by changing the production order
This commit is contained in:
parent
da71821204
commit
2ea3e9b081
@ -210,9 +210,9 @@ fn generate_automatons(
|
|||||||
|
|
||||||
// order automatons, the most important first,
|
// order automatons, the most important first,
|
||||||
// we keep the original automatons at the front.
|
// we keep the original automatons at the front.
|
||||||
automatons[1..].sort_unstable_by_key(|a| {
|
automatons[1..].sort_by_key(|a| {
|
||||||
let a = a.first().unwrap();
|
let a = a.first().unwrap();
|
||||||
(Reverse(a.is_exact), Reverse(a.ngram))
|
(Reverse(a.is_exact), a.ngram)
|
||||||
});
|
});
|
||||||
|
|
||||||
Ok((automatons, enhancer_builder.build()))
|
Ok((automatons, enhancer_builder.build()))
|
||||||
|
Loading…
Reference in New Issue
Block a user