We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0a46c0 commit bf79ae2Copy full SHA for bf79ae2
quickwit-search/src/collector.rs
@@ -289,10 +289,14 @@ impl Collector for QuickwitCollector {
289
// We compute the overall [0..start_offset + max_hits) documents ...
290
let num_hits = self.start_offset + self.max_hits;
291
let mut merged_leaf_response = merge_leaf_responses(segment_fruits, num_hits);
292
- // ... and drop the first [..start_offets) hits.
+ // ... and drop the first [..start_offsets) hits.
293
merged_leaf_response
294
.partial_hits
295
- .drain(0..self.start_offset)
+ .drain(
296
+ 0..self
297
+ .start_offset
298
+ .min(merged_leaf_response.partial_hits.len()),
299
+ )
300
.count(); //< we just use count as a way to consume the entire iterator.
301
Ok(merged_leaf_response)
302
}
0 commit comments