mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 21:04:27 +01:00
Use the latest version of the obkv crate
This commit is contained in:
parent
0c57cf7565
commit
b7c77c7a39
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -3851,7 +3851,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "obkv"
|
||||
version = "0.3.0"
|
||||
source = "git+https://github.com/kerollmops/obkv?branch=unsized-kvreader#9c2900d106fa84e7079b288e7f7c366ec7cae948"
|
||||
source = "git+https://github.com/kerollmops/obkv?branch=unsized-kvreader#ce535874008ecac554f02e0c670e6caf62134d6b"
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
|
@ -268,9 +268,11 @@ mod indexer {
|
||||
.into()),
|
||||
}?;
|
||||
|
||||
/// TODO create a function for this
|
||||
let current = current.as_bytes().to_vec().into_boxed_slice().into();
|
||||
Ok(DocumentChange::Deletion(Deletion::create(docid, external_docid, current)))
|
||||
Ok(DocumentChange::Deletion(Deletion::create(
|
||||
docid,
|
||||
external_docid,
|
||||
current.boxed(),
|
||||
)))
|
||||
})
|
||||
}))
|
||||
}
|
||||
@ -483,10 +485,11 @@ mod indexer {
|
||||
if operations.is_empty() {
|
||||
match current {
|
||||
Some(current) => {
|
||||
/// TODO create a function for this
|
||||
let current = current.as_bytes().to_vec().into_boxed_slice().into();
|
||||
let deletion = Deletion::create(docid, external_docid, current);
|
||||
return Ok(Some(DocumentChange::Deletion(deletion)));
|
||||
return Ok(Some(DocumentChange::Deletion(Deletion::create(
|
||||
docid,
|
||||
external_docid,
|
||||
current.boxed(),
|
||||
))));
|
||||
}
|
||||
None => return Ok(None),
|
||||
}
|
||||
@ -511,14 +514,11 @@ mod indexer {
|
||||
|
||||
let mut writer = KvWriterFieldId::memory();
|
||||
document.into_iter().for_each(|(id, value)| writer.insert(id, value).unwrap());
|
||||
/// TODO create a function for this conversion
|
||||
let new = writer.into_inner().unwrap().into_boxed_slice().into();
|
||||
let new = writer.into_boxed();
|
||||
|
||||
match current {
|
||||
Some(current) => {
|
||||
/// TODO create a function for this conversion
|
||||
let current = current.as_bytes().to_vec().into_boxed_slice().into();
|
||||
let update = Update::create(docid, external_docid, current, new);
|
||||
let update = Update::create(docid, external_docid, current.boxed(), new);
|
||||
Ok(Some(DocumentChange::Update(update)))
|
||||
}
|
||||
None => {
|
||||
@ -561,14 +561,11 @@ mod indexer {
|
||||
document_entries
|
||||
.into_iter()
|
||||
.for_each(|(id, value)| writer.insert(id, value).unwrap());
|
||||
/// TODO create a function for this conversion
|
||||
let new = writer.into_inner().unwrap().into_boxed_slice().into();
|
||||
let new = writer.into_boxed();
|
||||
|
||||
match current {
|
||||
Some(current) => {
|
||||
/// TODO create a function for this conversion
|
||||
let current = current.as_bytes().to_vec().into_boxed_slice().into();
|
||||
let update = Update::create(docid, external_docid, current, new);
|
||||
let update = Update::create(docid, external_docid, current.boxed(), new);
|
||||
Ok(Some(DocumentChange::Update(update)))
|
||||
}
|
||||
None => {
|
||||
@ -577,17 +574,13 @@ mod indexer {
|
||||
}
|
||||
}
|
||||
}
|
||||
Some(DocumentOperation::Deletion) => {
|
||||
match current {
|
||||
Some(current) => {
|
||||
/// TODO create a function for this conversion
|
||||
let current = current.as_bytes().to_vec().into_boxed_slice().into();
|
||||
let deletion = Deletion::create(docid, external_docid, current);
|
||||
Ok(Some(DocumentChange::Deletion(deletion)))
|
||||
}
|
||||
None => Ok(None),
|
||||
Some(DocumentOperation::Deletion) => match current {
|
||||
Some(current) => {
|
||||
let deletion = Deletion::create(docid, external_docid, current.boxed());
|
||||
Ok(Some(DocumentChange::Deletion(deletion)))
|
||||
}
|
||||
}
|
||||
None => Ok(None),
|
||||
},
|
||||
None => Ok(None),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user