pub trait ScoringIterator {
// Required methods
fn doc(&self) -> DocId;
fn advance(&mut self) -> DocId;
fn seek(&mut self, target: DocId) -> DocId;
fn score(&self) -> f32;
fn max_score(&self) -> f32;
fn current_block_max_score(&self) -> f32;
// Provided methods
fn is_exhausted(&self) -> bool { ... }
fn skip_to_next_block(&mut self) -> DocId { ... }
}Expand description
Common interface for scoring iterators (text terms or sparse dimensions)
Abstracts the common operations needed for WAND-style top-k retrieval.
Required Methods§
Sourcefn seek(&mut self, target: DocId) -> DocId
fn seek(&mut self, target: DocId) -> DocId
Seek to first document >= target, returns new doc ID
Sourcefn current_block_max_score(&self) -> f32
fn current_block_max_score(&self) -> f32
Current block’s maximum score upper bound (for block-level pruning)
Provided Methods§
Sourcefn is_exhausted(&self) -> bool
fn is_exhausted(&self) -> bool
Check if iterator is exhausted
Sourcefn skip_to_next_block(&mut self) -> DocId
fn skip_to_next_block(&mut self) -> DocId
Skip to the next block, returning the first doc_id in the new block. Used for block-max WAND optimization when current block can’t beat threshold. Default implementation just advances (no block-level skipping).