Add missing query_terms impl for TermSetQuery. (#2120)

This commit is contained in:
Adam Reichold
2023-07-13 14:54:29 +02:00
committed by GitHub
parent 1e7cd48cfa
commit 5fafe4b1ab

View File

@@ -72,6 +72,14 @@ impl Query for TermSetQuery {
fn weight(&self, enable_scoring: EnableScoring<'_>) -> crate::Result<Box<dyn Weight>> {
Ok(Box::new(self.specialized_weight(enable_scoring.schema())?))
}
fn query_terms<'a>(&'a self, visitor: &mut dyn FnMut(&'a Term, bool)) {
for terms in self.terms_map.values() {
for term in terms {
visitor(term, false);
}
}
}
}
struct SetDfaWrapper(Map<Vec<u8>>);