Add SearchContext::word_docids() method

This commit is contained in:
Louis Dureuil
2023-04-11 18:26:44 +02:00
committed by Loïc Lecrenier
parent e7ff987c46
commit 325f17488a
2 changed files with 52 additions and 0 deletions

View File

@ -75,6 +75,21 @@ impl<'ctx> SearchContext<'ctx> {
}
}
#[derive(Clone, Copy, PartialEq, PartialOrd, Ord, Eq)]
pub enum Word {
Original(Interned<String>),
Derived(Interned<String>),
}
impl Word {
pub fn interned(&self) -> Interned<String> {
match self {
Word::Original(word) => *word,
Word::Derived(word) => *word,
}
}
}
/// Apply the [`TermsMatchingStrategy`] to the query graph and resolve it.
#[allow(clippy::too_many_arguments)]
fn resolve_maximally_reduced_query_graph(