pub trait Scorer: Send {
// Required methods
fn doc(&self) -> DocId;
fn score(&self) -> Score;
fn advance(&mut self) -> DocId;
fn seek(&mut self, target: DocId) -> DocId;
fn size_hint(&self) -> u32;
// Provided method
fn matched_positions(&self) -> Option<MatchedPositions> { ... }
}Expand description
Scorer that iterates over matching documents and computes scores
Required Methods§
Provided Methods§
Sourcefn matched_positions(&self) -> Option<MatchedPositions>
fn matched_positions(&self) -> Option<MatchedPositions>
Get matched positions for the current document (if available) Returns (field_id, positions) pairs where positions are encoded as per PositionMode