mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Simplify optional document decompression usage
This commit is contained in:
parent
e18b06ddda
commit
e95e47d258
7 changed files with 37 additions and 43 deletions
|
@ -922,11 +922,10 @@ impl IndexScheduler {
|
|||
}
|
||||
|
||||
let (id, compressed) = ret?;
|
||||
let doc = match dictionary.as_ref() {
|
||||
// TODO manage this unwrap correctly
|
||||
Some(dict) => compressed.decompress_with(&mut buffer, dict)?,
|
||||
None => compressed.as_non_compressed(),
|
||||
};
|
||||
let doc = compressed.decompress_with_optional_dictionary(
|
||||
&mut buffer,
|
||||
dictionary.as_ref(),
|
||||
)?;
|
||||
|
||||
let mut document = milli::obkv_to_json(&all_fields, &fields_ids_map, doc)?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue