Fix the bucket candidates

This commit is contained in:
Kerollmops
2021-03-09 15:55:59 +01:00
parent 42fd7dea78
commit facfb4b615
3 changed files with 13 additions and 8 deletions

View File

@ -175,6 +175,11 @@ impl<'t> Criterion for AscDesc<'t> {
},
(None, None) => take(&mut self.faceted_candidates),
};
if bucket_candidates.is_empty() {
self.bucket_candidates.union_with(&candidates);
} else {
self.bucket_candidates.union_with(&bucket_candidates);
}
self.candidates = facet_ordered(
self.index,
self.rtxn,
@ -183,7 +188,6 @@ impl<'t> Criterion for AscDesc<'t> {
self.ascending,
candidates,
)?;
self.bucket_candidates = bucket_candidates;
},
None => return Ok(None),
}