Skip to main content

search_ids

Function search_ids 

Source
pub fn search_ids<C, R, S>(
    query: &[(DimId, Weight)],
    ids: &[RecordId],
    cursors: R,
    sink: S,
    scratch: &mut Scratch,
) -> Vec<(RecordId, f32)>
where C: PostingCursor, R: FnMut(DimId) -> Option<C>, S: ScoreSink,
Expand description

Score only ids — sorted ascending, without duplicates — by seeking every lane to each of them, and offer the ones present in at least one lane to the sink. Cost O(|ids| × lanes × log): the path for a caller who already knows the candidates (a database pre-filter) when they are few against the postings a window search would walk. Scores are the same f32 sums as search_with: contributions added lane by lane in query order.