Struct tantivy::query::BitSetDocSet [−][src]
pub struct BitSetDocSet { /* fields omitted */ }
A BitSetDocSet
makes it possible to iterate through a bitset as if it was a DocSet
.
Implementation detail
Skipping is relatively fast here as we can directly point to the right tiny bitset bucket.
TODO: Consider implementing a BitTreeSet
in order to advance faster
when the bitset is sparse
Trait Implementations
impl DocSet for BitSetDocSet
[src]
impl DocSet for BitSetDocSet
fn advance(&mut self) -> bool
[src]
fn advance(&mut self) -> bool
Goes to the next element. .advance(...)
needs to be called a first time to point to the correct element. Read more
fn skip_next(&mut self, target: DocId) -> SkipResult
[src]
fn skip_next(&mut self, target: DocId) -> SkipResult
After skipping, position the iterator in such a way that .doc()
will return a value greater than or equal to target. Read more
fn doc(&self) -> DocId
[src]
fn doc(&self) -> DocId
Returns the current document
fn size_hint(&self) -> u32
[src]
fn size_hint(&self) -> u32
Returns half of the max_doc
This is quite a terrible heuristic,
but we don't have access to any better
value.
fn fill_buffer(&mut self, buffer: &mut [DocId]) -> usize
[src]
fn fill_buffer(&mut self, buffer: &mut [DocId]) -> usize
Fills a given mutable buffer with the next doc ids from the DocSet
Read more
fn append_to_bitset(&mut self, bitset: &mut BitSet)
[src]
fn append_to_bitset(&mut self, bitset: &mut BitSet)
Appends all docs to a bitset
.
fn count(&mut self) -> u32
[src]
fn count(&mut self) -> u32
Returns the number documents matching. Read more
Auto Trait Implementations
impl Send for BitSetDocSet
impl Send for BitSetDocSet
impl Sync for BitSetDocSet
impl Sync for BitSetDocSet