mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 05:14:27 +01:00
Fix the bucket candidates
This commit is contained in:
parent
42fd7dea78
commit
facfb4b615
@ -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),
|
||||
}
|
||||
|
@ -179,10 +179,15 @@ impl<'t> Criterion for Proximity<'t> {
|
||||
(None, None) => RoaringBitmap::new(),
|
||||
};
|
||||
|
||||
if bucket_candidates.is_empty() {
|
||||
self.bucket_candidates.union_with(&candidates);
|
||||
} else {
|
||||
self.bucket_candidates.union_with(&bucket_candidates);
|
||||
}
|
||||
|
||||
self.query_tree = query_tree.map(|op| (maximum_proximity(&op), op));
|
||||
self.proximity = 0;
|
||||
self.candidates = Candidates::Allowed(candidates);
|
||||
self.bucket_candidates.union_with(&bucket_candidates);
|
||||
self.plane_sweep_cache = None;
|
||||
},
|
||||
None => return Ok(None),
|
||||
|
@ -127,16 +127,12 @@ impl<'t> Criterion for Typo<'t> {
|
||||
new_candidates.difference_with(&candidates);
|
||||
candidates.union_with(&new_candidates);
|
||||
self.number_typos += 1;
|
||||
|
||||
let bucket_candidates = match self.parent {
|
||||
Some(_) => take(&mut self.bucket_candidates),
|
||||
None => new_candidates.clone(),
|
||||
};
|
||||
self.bucket_candidates.union_with(&new_candidates);
|
||||
|
||||
return Ok(Some(CriterionResult {
|
||||
query_tree: Some(new_query_tree),
|
||||
candidates: Some(new_candidates),
|
||||
bucket_candidates,
|
||||
bucket_candidates: take(&mut self.bucket_candidates),
|
||||
}));
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user