mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Get ride of rust messagepack (rmp)
This commit is contained in:
parent
81bf6d583d
commit
710ab2386c
9 changed files with 45 additions and 76 deletions
|
@ -65,8 +65,8 @@ pub fn push_documents_addition<D: serde::Serialize>(
|
|||
{
|
||||
let mut values = Vec::with_capacity(addition.len());
|
||||
for add in addition {
|
||||
let vec = rmp_serde::to_vec_named(&add)?;
|
||||
let add = rmp_serde::from_read(&vec[..])?;
|
||||
let vec = serde_json::to_vec(&add)?;
|
||||
let add = serde_json::from_slice(&vec)?;
|
||||
values.push(add);
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ pub fn apply_documents_addition(
|
|||
postings_lists_store: store::PostingsLists,
|
||||
docs_words_store: store::DocsWords,
|
||||
mut ranked_map: RankedMap,
|
||||
addition: Vec<rmpv::Value>,
|
||||
addition: Vec<serde_json::Value>,
|
||||
) -> MResult<()>
|
||||
{
|
||||
let mut document_ids = HashSet::new();
|
||||
|
|
|
@ -26,7 +26,7 @@ use meilidb_schema::Schema;
|
|||
pub enum Update {
|
||||
Schema(Schema),
|
||||
Customs(Vec<u8>),
|
||||
DocumentsAddition(Vec<rmpv::Value>),
|
||||
DocumentsAddition(Vec<serde_json::Value>),
|
||||
DocumentsDeletion(Vec<DocumentId>),
|
||||
SynonymsAddition(BTreeMap<String, Vec<String>>),
|
||||
SynonymsDeletion(BTreeMap<String, Option<Vec<String>>>),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue