Introduce a cache on the docid_word_positions database method

This commit is contained in:
Kerollmops
2021-03-08 16:12:03 +01:00
parent 5fcaedb880
commit 82a0f678fb
2 changed files with 55 additions and 23 deletions

View File

@ -379,7 +379,7 @@ mod test {
let facet_candidates = None;
let mut wdcache = WordDerivationsCache::new();
let mut wdcache = WordDerivationsCache::new();
let mut criteria = Typo::initial(&context, Some(query_tree), facet_candidates);
let candidates_1 = context.word_docids("split").unwrap().unwrap()
@ -428,7 +428,7 @@ let mut wdcache = WordDerivationsCache::new();
let query_tree = None;
let facet_candidates = context.word_docids("earth").unwrap().unwrap();
let mut wdcache = WordDerivationsCache::new();
let mut wdcache = WordDerivationsCache::new();
let mut criteria = Typo::initial(&context, query_tree, Some(facet_candidates.clone()));
let expected = CriterionResult {
@ -457,7 +457,7 @@ let mut wdcache = WordDerivationsCache::new();
let facet_candidates = context.word_docids("earth").unwrap().unwrap();
let mut wdcache = WordDerivationsCache::new();
let mut wdcache = WordDerivationsCache::new();
let mut criteria = Typo::initial(&context, Some(query_tree), Some(facet_candidates.clone()));
let candidates_1 = context.word_docids("split").unwrap().unwrap()