diff --git a/src/query/union/buffered_union.rs b/src/query/union/buffered_union.rs index 42e376ef0..a3bf64990 100644 --- a/src/query/union/buffered_union.rs +++ b/src/query/union/buffered_union.rs @@ -217,6 +217,18 @@ where } } + fn seek_exact(&mut self, target: DocId) -> bool { + let is_hit = self + .docsets + .iter_mut() + .all(|docset| docset.seek_exact(target)); + // The API requires the DocSet to be in a valid state when `seek_exact` returns true. + if is_hit { + self.seek(target); + } + is_hit + } + fn doc(&self) -> DocId { self.doc }