mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
Merge pull request #236 from meilisearch/reorder-automatons
Make sure that automatons group with more automatons are better
This commit is contained in:
commit
d6fb2b56d1
@ -284,7 +284,11 @@ fn generate_automatons(
|
|||||||
// we keep the original automatons at the front.
|
// we keep the original automatons at the front.
|
||||||
automatons[1..].sort_by_key(|group| {
|
automatons[1..].sort_by_key(|group| {
|
||||||
let a = group.automatons.first().unwrap();
|
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()))
|
Ok((automatons, enhancer_builder.build()))
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
use meilidb_schema::{Diff, Schema};
|
|
||||||
|
|
||||||
use crate::update::documents_addition::reindex_all_documents;
|
|
||||||
use crate::update::{next_update_id, Update};
|
use crate::update::{next_update_id, Update};
|
||||||
use crate::{error::UnsupportedOperation, store, MResult, RankedMap};
|
use crate::{store, MResult, RankedMap};
|
||||||
|
|
||||||
pub fn apply_clear_all(
|
pub fn apply_clear_all(
|
||||||
writer: &mut heed::RwTxn,
|
writer: &mut heed::RwTxn,
|
||||||
|
Loading…
Reference in New Issue
Block a user