mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Update milli version to v0.8.0
This commit is contained in:
parent
dd18319b44
commit
e5dabf265a
4 changed files with 58 additions and 21 deletions
|
@ -42,7 +42,7 @@ fst = "0.4.5"
|
|||
futures = "0.3.7"
|
||||
futures-util = "0.3.8"
|
||||
grenad = { git = "https://github.com/Kerollmops/grenad.git", rev = "3adcb26" }
|
||||
heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.0" }
|
||||
heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1" }
|
||||
http = "0.2.1"
|
||||
indexmap = { version = "1.3.2", features = ["serde-1"] }
|
||||
itertools = "0.10.0"
|
||||
|
@ -51,7 +51,7 @@ main_error = "0.1.0"
|
|||
meilisearch-error = { path = "../meilisearch-error" }
|
||||
meilisearch-tokenizer = { git = "https://github.com/meilisearch/tokenizer.git", tag = "v0.2.3" }
|
||||
memmap = "0.7.0"
|
||||
milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.7.2" }
|
||||
milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.8.0" }
|
||||
mime = "0.3.16"
|
||||
num_cpus = "1.13.0"
|
||||
once_cell = "1.5.2"
|
||||
|
@ -73,7 +73,7 @@ thiserror = "1.0.24"
|
|||
tokio = { version = "1", features = ["full"] }
|
||||
uuid = { version = "0.8.2", features = ["serde"] }
|
||||
walkdir = "2.3.2"
|
||||
obkv = "0.1.1"
|
||||
obkv = "0.2.0"
|
||||
pin-project = "1.0.7"
|
||||
whoami = { version = "1.1.2", optional = true }
|
||||
reqwest = { version = "0.11.3", features = ["json", "rustls-tls"], default-features = false, optional = true }
|
||||
|
|
|
@ -174,7 +174,7 @@ impl Index {
|
|||
txn: &heed::RoTxn,
|
||||
attributes_to_retrieve: &Option<Vec<S>>,
|
||||
fields_ids_map: &milli::FieldsIdsMap,
|
||||
) -> Result<Vec<u8>> {
|
||||
) -> Result<Vec<u16>> {
|
||||
let mut displayed_fields_ids = match self.displayed_fields_ids(&txn)? {
|
||||
Some(ids) => ids.into_iter().collect::<Vec<_>>(),
|
||||
None => fields_ids_map.iter().map(|(id, _)| id).collect(),
|
||||
|
|
|
@ -281,9 +281,9 @@ fn compute_formatted_options(
|
|||
attr_to_highlight: &HashSet<String>,
|
||||
attr_to_crop: &[String],
|
||||
query_crop_length: usize,
|
||||
to_retrieve_ids: &BTreeSet<u8>,
|
||||
to_retrieve_ids: &BTreeSet<u16>,
|
||||
fields_ids_map: &FieldsIdsMap,
|
||||
displayed_ids: &BTreeSet<u8>,
|
||||
displayed_ids: &BTreeSet<u16>,
|
||||
) -> BTreeMap<FieldId, FormatOptions> {
|
||||
let mut formatted_options = BTreeMap::new();
|
||||
|
||||
|
@ -314,7 +314,7 @@ fn add_highlight_to_formatted_options(
|
|||
formatted_options: &mut BTreeMap<FieldId, FormatOptions>,
|
||||
attr_to_highlight: &HashSet<String>,
|
||||
fields_ids_map: &FieldsIdsMap,
|
||||
displayed_ids: &BTreeSet<u8>,
|
||||
displayed_ids: &BTreeSet<u16>,
|
||||
) {
|
||||
for attr in attr_to_highlight {
|
||||
let new_format = FormatOptions {
|
||||
|
@ -342,7 +342,7 @@ fn add_crop_to_formatted_options(
|
|||
attr_to_crop: &[String],
|
||||
crop_length: usize,
|
||||
fields_ids_map: &FieldsIdsMap,
|
||||
displayed_ids: &BTreeSet<u8>,
|
||||
displayed_ids: &BTreeSet<u16>,
|
||||
) {
|
||||
for attr in attr_to_crop {
|
||||
let mut split = attr.rsplitn(2, ':');
|
||||
|
@ -382,7 +382,7 @@ fn add_crop_to_formatted_options(
|
|||
|
||||
fn add_non_formatted_ids_to_formatted_options(
|
||||
formatted_options: &mut BTreeMap<FieldId, FormatOptions>,
|
||||
to_retrieve_ids: &BTreeSet<u8>,
|
||||
to_retrieve_ids: &BTreeSet<u16>,
|
||||
) {
|
||||
for id in to_retrieve_ids {
|
||||
formatted_options.entry(*id).or_insert(FormatOptions {
|
||||
|
@ -395,7 +395,7 @@ fn add_non_formatted_ids_to_formatted_options(
|
|||
fn make_document(
|
||||
attributes_to_retrieve: &BTreeSet<FieldId>,
|
||||
field_ids_map: &FieldsIdsMap,
|
||||
obkv: obkv::KvReader,
|
||||
obkv: obkv::KvReaderU16,
|
||||
) -> Result<Document> {
|
||||
let mut document = Document::new();
|
||||
|
||||
|
@ -418,7 +418,7 @@ fn make_document(
|
|||
|
||||
fn format_fields<A: AsRef<[u8]>>(
|
||||
field_ids_map: &FieldsIdsMap,
|
||||
obkv: obkv::KvReader,
|
||||
obkv: obkv::KvReaderU16,
|
||||
formatter: &Formatter<A>,
|
||||
matching_words: &impl Matcher,
|
||||
formatted_options: &BTreeMap<FieldId, FormatOptions>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue