mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 20:15:07 +08:00
Add some comments
This commit is contained in:
parent
745bcaa23d
commit
5e12a83ae8
@ -94,6 +94,7 @@ impl<'pl> DocumentOperation<'pl> {
|
|||||||
while let Some(document) =
|
while let Some(document) =
|
||||||
iter.next().transpose().map_err(UserError::SerdeJson)?
|
iter.next().transpose().map_err(UserError::SerdeJson)?
|
||||||
{
|
{
|
||||||
|
// TODO Do not allocate when it is not necessary
|
||||||
let external_document_id = primary_key.extract_fields_and_docid(
|
let external_document_id = primary_key.extract_fields_and_docid(
|
||||||
document,
|
document,
|
||||||
new_fields_ids_map,
|
new_fields_ids_map,
|
||||||
@ -198,6 +199,7 @@ impl<'pl> DocumentOperation<'pl> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// And finally sort them
|
// And finally sort them
|
||||||
|
// TODO Can we sort in parallel?
|
||||||
docids_version_offsets.sort_unstable_by_key(|(_, (_, docops))| sort_function_key(docops));
|
docids_version_offsets.sort_unstable_by_key(|(_, (_, docops))| sort_function_key(docops));
|
||||||
let docids_version_offsets = docids_version_offsets.into_bump_slice();
|
let docids_version_offsets = docids_version_offsets.into_bump_slice();
|
||||||
Ok(DocumentOperationChanges {
|
Ok(DocumentOperationChanges {
|
||||||
|
Loading…
Reference in New Issue
Block a user