mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-27 04:25:06 +08:00
Revert behaviour of facet distribution to what it was before
Where the docid that is used to get the original facet string value definitely belongs to the candidates
This commit is contained in:
parent
14ca8048a8
commit
3b1f908e5e
@ -74,13 +74,12 @@ where
|
|||||||
if key.field_id != self.field_id {
|
if key.field_id != self.field_id {
|
||||||
return Ok(ControlFlow::Break(()));
|
return Ok(ControlFlow::Break(()));
|
||||||
}
|
}
|
||||||
// TODO: use real intersection and then take min()?
|
let docids_in_common = value.bitmap & candidates;
|
||||||
let docids_in_common = value.bitmap.intersection_len(candidates);
|
if !docids_in_common.is_empty() {
|
||||||
if docids_in_common > 0 {
|
let any_docid_in_common = docids_in_common.min().unwrap();
|
||||||
// TODO: use min()
|
match (self.callback)(key.left_bound, docids_in_common.len(), any_docid_in_common)?
|
||||||
let any_docid = value.bitmap.iter().next().unwrap();
|
{
|
||||||
match (self.callback)(key.left_bound, docids_in_common, any_docid)? {
|
ControlFlow::Continue(_) => (),
|
||||||
ControlFlow::Continue(_) => (), // TODO use unit instead of empty scope
|
|
||||||
ControlFlow::Break(_) => return Ok(ControlFlow::Break(())),
|
ControlFlow::Break(_) => return Ok(ControlFlow::Break(())),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user