mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-26 00:01:00 +00:00
convert the field_distribution to a BTreeMap and avoid counting twice the same documents
This commit is contained in:
@ -14,7 +14,7 @@ pub mod tree_level;
|
||||
pub mod update;
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::{BTreeMap, HashMap};
|
||||
use std::hash::BuildHasherDefault;
|
||||
use std::result::Result as StdResult;
|
||||
|
||||
@ -50,7 +50,7 @@ pub type Attribute = u32;
|
||||
pub type DocumentId = u32;
|
||||
pub type FieldId = u8;
|
||||
pub type Position = u32;
|
||||
pub type FieldsDistribution = HashMap<String, u64>;
|
||||
pub type FieldsDistribution = BTreeMap<String, u64>;
|
||||
|
||||
type MergeFn<E> = for<'a> fn(&[u8], &[Cow<'a, [u8]>]) -> StdResult<Vec<u8>, E>;
|
||||
|
||||
|
Reference in New Issue
Block a user