mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-06-01 08:00:41 +00:00
Defer terminated scorer removal during buffered refill
This commit is contained in:
@@ -66,17 +66,16 @@ fn refill<TScorer: Scorer, TScoreCombiner: ScoreCombiner>(
|
||||
loop {
|
||||
let doc = scorer.doc();
|
||||
if doc >= horizon {
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
// add this document
|
||||
let delta = doc - min_doc;
|
||||
bitsets[(delta / 64) as usize].insert_mut(delta % 64u32);
|
||||
score_combiner[delta as usize].update(scorer);
|
||||
if scorer.advance() == TERMINATED {
|
||||
// remove the docset, it has been entirely consumed.
|
||||
return true;
|
||||
}
|
||||
scorer.advance();
|
||||
}
|
||||
// remove the docset if it has been entirely consumed.
|
||||
scorer.doc() == TERMINATED
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user