mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-06 01:02:55 +00:00
impl seek_exact on union
This commit is contained in:
committed by
Pascal Seitz
parent
e5bf84c7d0
commit
a0123192c8
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user