Make it work by avoid storing invalid stuff in the cache

This commit is contained in:
Clément Renault 2024-06-21 15:03:51 +02:00
parent 41f51adbec
commit cd7a20fa32
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
4 changed files with 9 additions and 9 deletions

View file

@ -47,7 +47,7 @@ pub fn compute_query_term_subset_docids(
}
}
for phrase in term.all_phrases(ctx)? {
docids |= ctx.get_phrase_docids(universe, phrase)?;
docids |= ctx.get_phrase_docids(None, phrase)?;
}
if let Some(prefix) = term.use_prefix_db(ctx) {
@ -80,7 +80,7 @@ pub fn compute_query_term_subset_docids_within_field_id(
// guaranteed that all of its words are within a single fid.
if let Some(word) = phrase.words(ctx).iter().flatten().next() {
if let Some(word_fid_docids) = ctx.get_db_word_fid_docids(universe, *word, fid)? {
docids |= ctx.get_phrase_docids(Some(&word_fid_docids), phrase)?;
docids |= ctx.get_phrase_docids(None, phrase)? & word_fid_docids;
}
}
}
@ -118,7 +118,7 @@ pub fn compute_query_term_subset_docids_within_position(
if let Some(word_position_docids) =
ctx.get_db_word_position_docids(universe, *word, position)?
{
docids |= ctx.get_phrase_docids(Some(&word_position_docids), phrase)?;
docids |= ctx.get_phrase_docids(None, phrase)? & word_position_docids;
}
}
}