mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-10 21:44:34 +01:00
Reduce union impact in merging
This commit is contained in:
parent
3b0b9967f6
commit
71f59749dc
@ -235,8 +235,12 @@ fn merge_cbo_bitmaps(
|
||||
(Some(_current), None, None) => Ok(Operation::Ignore), // but it's strange
|
||||
(Some(current), None, Some(add)) => Ok(Operation::Write(current | add)),
|
||||
(Some(current), Some(del), add) => {
|
||||
debug_assert!(
|
||||
del.is_subset(¤t),
|
||||
"del is not a subset of current, which must be impossible."
|
||||
);
|
||||
let output = match add {
|
||||
Some(add) => (¤t - del) | add,
|
||||
Some(add) => (¤t - (&del - &add)) | (add - del),
|
||||
None => ¤t - del,
|
||||
};
|
||||
if output.is_empty() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user