Do an union of the bucket candidates

This commit is contained in:
Kerollmops 2021-02-25 17:28:20 +01:00
parent b0e0c5eba0
commit 36c1f93ceb
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
4 changed files with 4 additions and 4 deletions

View File

@ -174,7 +174,7 @@ impl<'t> Criterion for AscDesc<'t> {
self.query_tree = query_tree; self.query_tree = query_tree;
candidates.intersect_with(&self.faceted_candidates); candidates.intersect_with(&self.faceted_candidates);
self.candidates = Candidates::Allowed(candidates); self.candidates = Candidates::Allowed(candidates);
self.bucket_candidates = bucket_candidates; self.bucket_candidates.union_with(&bucket_candidates);
}, },
None => return Ok(None), None => return Ok(None),
} }

View File

@ -139,7 +139,7 @@ impl<'t> Criterion for Proximity<'t> {
self.query_tree = query_tree.map(|op| (maximum_proximity(&op), op)); self.query_tree = query_tree.map(|op| (maximum_proximity(&op), op));
self.proximity = 0; self.proximity = 0;
self.candidates = Candidates::Allowed(candidates); self.candidates = Candidates::Allowed(candidates);
self.bucket_candidates = bucket_candidates; self.bucket_candidates.union_with(&bucket_candidates);
}, },
None => return Ok(None), None => return Ok(None),
} }

View File

@ -147,7 +147,7 @@ impl<'t> Criterion for Typo<'t> {
self.query_tree = query_tree.map(|op| (maximum_typo(&op), op)); self.query_tree = query_tree.map(|op| (maximum_typo(&op), op));
self.number_typos = 0; self.number_typos = 0;
self.candidates = Candidates::Allowed(candidates); self.candidates = Candidates::Allowed(candidates);
self.bucket_candidates = bucket_candidates; self.bucket_candidates.union_with(&bucket_candidates);
}, },
None => return Ok(None), None => return Ok(None),
} }

View File

@ -107,7 +107,7 @@ impl<'t> Criterion for Words<'t> {
Some(CriterionResult { query_tree, candidates, bucket_candidates }) => { Some(CriterionResult { query_tree, candidates, bucket_candidates }) => {
self.query_trees = query_tree.map(explode_query_tree).unwrap_or_default(); self.query_trees = query_tree.map(explode_query_tree).unwrap_or_default();
self.candidates = Candidates::Allowed(candidates); self.candidates = Candidates::Allowed(candidates);
self.bucket_candidates = bucket_candidates; self.bucket_candidates.union_with(&bucket_candidates);
}, },
None => return Ok(None), None => return Ok(None),
} }