mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 10:37:41 +08:00
Update milli/src/update/index_documents/transform.rs
Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
parent
43a19d0709
commit
8de3c9f737
@ -786,9 +786,8 @@ fn merge_obkvs_and_operations<'a>(_key: &[u8], obkvs: &[Cow<'a, [u8]>]) -> Resul
|
||||
// we can ignore everything that happened before the last delete.
|
||||
let starting_position = obkvs
|
||||
.iter()
|
||||
.rev()
|
||||
.position(|obkv| obkv[0] == Operation::Deletion as u8)
|
||||
.map_or(0, |pos| obkvs.len() - pos);
|
||||
.rposition(|obkv| obkv[0] == Operation::Deletion as u8)
|
||||
.unwrap_or(0);
|
||||
|
||||
// [add, add, delete]
|
||||
// if the last operation was a deletion then we simply return the deletion
|
||||
|
Loading…
Reference in New Issue
Block a user