mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-09 04:54:31 +01:00
When spilling on the next fid, no longer ignore children
This commit is contained in:
parent
7ec7200378
commit
e83c021755
@ -144,12 +144,26 @@ impl FacetsUpdateIncrementalInner {
|
||||
.prefix_iter_mut(wtxn, &parent_level_left_bound)?;
|
||||
match parent_it.next() {
|
||||
// 1. left of the current left bound, or
|
||||
Some(Ok((first_key, _first_value))) => 'change_left_bound: {
|
||||
Some(Ok((first_key, _first_value))) => {
|
||||
// make sure we don't spill on the neighboring fid (level also included defensively)
|
||||
if first_key.field_id != self.field_id
|
||||
|| first_key.level != parent_level
|
||||
{
|
||||
break 'change_left_bound;
|
||||
// max level reached, exit
|
||||
drop(parent_it);
|
||||
self.compute_parent_group(
|
||||
wtxn,
|
||||
child_level,
|
||||
child.facet_value,
|
||||
)?;
|
||||
for child in child_it.by_ref() {
|
||||
self.compute_parent_group(
|
||||
wtxn,
|
||||
child_level,
|
||||
child.facet_value,
|
||||
)?;
|
||||
}
|
||||
return Ok(());
|
||||
}
|
||||
// remove old left bound
|
||||
unsafe { parent_it.del_current()? };
|
||||
@ -170,8 +184,6 @@ impl FacetsUpdateIncrementalInner {
|
||||
child.facet_value,
|
||||
)?;
|
||||
}
|
||||
|
||||
break 'current_level;
|
||||
}
|
||||
Some(Err(err)) => return Err(err.into()),
|
||||
// 2. max level reached, exit
|
||||
|
Loading…
x
Reference in New Issue
Block a user