mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-30 00:34:26 +01:00
Take filter in account when computing the pages candidates
This commit is contained in:
parent
d71bc1e69f
commit
cf203b7fde
@ -38,12 +38,16 @@ impl<D: Distinct> Criterion for Initial<'_, D> {
|
|||||||
.take()
|
.take()
|
||||||
.map(|mut answer| {
|
.map(|mut answer| {
|
||||||
if self.exhaustive_number_hits && answer.query_tree.is_some() {
|
if self.exhaustive_number_hits && answer.query_tree.is_some() {
|
||||||
let candidates = resolve_query_tree(
|
let mut candidates = resolve_query_tree(
|
||||||
self.ctx,
|
self.ctx,
|
||||||
answer.query_tree.as_ref().unwrap(),
|
answer.query_tree.as_ref().unwrap(),
|
||||||
&mut params.wdcache,
|
&mut params.wdcache,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
if let Some(ref filtered_candidates) = answer.filtered_candidates {
|
||||||
|
candidates &= filtered_candidates;
|
||||||
|
}
|
||||||
|
|
||||||
let bucket_candidates = match &mut self.distinct {
|
let bucket_candidates = match &mut self.distinct {
|
||||||
// may be really time consuming
|
// may be really time consuming
|
||||||
Some(distinct) => {
|
Some(distinct) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user