NOBUG added advance_block

This commit is contained in:
Paul Masurel
2017-02-22 10:50:25 +09:00
parent f9ca0b16f1
commit d32dff1da9
2 changed files with 5 additions and 2 deletions

View File

@@ -263,7 +263,7 @@ mod tests {
b.iter(|| {
let mut segment_postings = segment_reader.read_postings(&*TERM_A, SegmentPostingsOption::NoFreq).unwrap();
while segment_postings.advance() {}
while segment_postings.advance_block() {}
});
}

View File

@@ -103,7 +103,10 @@ impl<'a> SegmentPostings<'a> {
}
}
pub fn advance_block(&mut self) -> bool {
self.block_cursor.advance()
}
/// Returns an empty segment postings object
pub fn empty() -> SegmentPostings<'static> {
let empty_block_cursor = SegmentPostingsBlockCursor::empty();