mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-25 19:45:05 +08:00
"fix" last warnings
This commit is contained in:
parent
7cb8732b45
commit
cae8c89467
@ -204,7 +204,7 @@ fn merge_btreesets(
|
|||||||
result.extend(add);
|
result.extend(add);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TODO remove allocation
|
// TODO remove allocation
|
||||||
let result = SerdeJson::bytes_encode(&result).map_err(heed::Error::Encoding)?.into_owned();
|
let result = SerdeJson::bytes_encode(&result).map_err(heed::Error::Encoding)?.into_owned();
|
||||||
if Some(result.as_ref()) == current {
|
if Some(result.as_ref()) == current {
|
||||||
Ok(Operation::Ignore)
|
Ok(Operation::Ignore)
|
||||||
|
@ -133,7 +133,6 @@ fn extract_addition_payload_changes<'r, 'pl: 'r>(
|
|||||||
) -> Result<hashbrown::HashMap<&'pl str, PayloadOperations<'pl>>> {
|
) -> Result<hashbrown::HashMap<&'pl str, PayloadOperations<'pl>>> {
|
||||||
let mut new_docids_version_offsets = hashbrown::HashMap::<&str, PayloadOperations<'pl>>::new();
|
let mut new_docids_version_offsets = hashbrown::HashMap::<&str, PayloadOperations<'pl>>::new();
|
||||||
|
|
||||||
/// TODO manage the error
|
|
||||||
let mut previous_offset = 0;
|
let mut previous_offset = 0;
|
||||||
let mut iter = Deserializer::from_slice(payload).into_iter::<&RawValue>();
|
let mut iter = Deserializer::from_slice(payload).into_iter::<&RawValue>();
|
||||||
while let Some(doc) = iter.next().transpose().map_err(InternalError::SerdeJson)? {
|
while let Some(doc) = iter.next().transpose().map_err(InternalError::SerdeJson)? {
|
||||||
@ -160,6 +159,7 @@ fn extract_addition_payload_changes<'r, 'pl: 'r>(
|
|||||||
|
|
||||||
primary_key.get_or_insert(pk)
|
primary_key.get_or_insert(pk)
|
||||||
} else {
|
} else {
|
||||||
|
// primary key was retrieved in the first iteration or in a previous payload
|
||||||
primary_key.as_ref().unwrap()
|
primary_key.as_ref().unwrap()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -26,8 +26,8 @@ impl<I> PartialDump<I> {
|
|||||||
concurrent_available_ids: &'index ConcurrentAvailableIds,
|
concurrent_available_ids: &'index ConcurrentAvailableIds,
|
||||||
primary_key: &'index PrimaryKey,
|
primary_key: &'index PrimaryKey,
|
||||||
) -> PartialDumpChanges<'index, I> {
|
) -> PartialDumpChanges<'index, I> {
|
||||||
/// Note for future self:
|
// Note for future self:
|
||||||
/// - We recommend sending chunks of documents in this `PartialDumpIndexer` we therefore need to create a custom take_while_size method (that doesn't drop items).
|
// - We recommend sending chunks of documents in this `PartialDumpIndexer` we therefore need to create a custom take_while_size method (that doesn't drop items).
|
||||||
PartialDumpChanges { iter: self.iter, concurrent_available_ids, primary_key }
|
PartialDumpChanges { iter: self.iter, concurrent_available_ids, primary_key }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user