implement Context trait for criteria

This commit is contained in:
many
2021-02-17 15:27:35 +01:00
committed by Kerollmops
parent f091f370d0
commit 98e69e63d2
3 changed files with 152 additions and 40 deletions

View File

@ -288,7 +288,8 @@ impl<'a> Search<'a> {
debug!("facet candidates: {:?} took {:.02?}", facet_candidates, before.elapsed());
// We aretesting the typo criteria but there will be more of them soon.
let mut criteria = Typo::initial(self.index, self.rtxn, query_tree, facet_candidates)?;
let criteria_ctx = criteria::HeedContext::new(self.rtxn, self.index)?;
let mut criteria = Typo::initial(&criteria_ctx, query_tree, facet_candidates)?;
let mut offset = self.offset;
let mut limit = self.limit;