Positions almost working.

This commit is contained in:
Paul Masurel
2017-08-05 23:17:35 +09:00
parent 63b35dd87b
commit 236fa74767
4 changed files with 103 additions and 22 deletions

View File

@@ -24,7 +24,6 @@ use postings::SegmentPostingsOption;
use postings::{SegmentPostings, BlockSegmentPostings};
use fastfield::{FastFieldsReader, FastFieldReader, U64FastFieldReader};
use schema::Schema;
use postings::FreqHandler;
@@ -198,10 +197,10 @@ impl SegmentReader {
/// For instance, requesting `SegmentPostingsOption::FreqAndPositions` for a
/// `TextIndexingOptions` that does not index position will return a `SegmentPostings`
/// with `DocId`s and frequencies.
pub fn read_postings(&self,
pub fn read_postings<'a>(&'a self,
term: &Term,
option: SegmentPostingsOption)
-> Option<SegmentPostings> {
-> Option<SegmentPostings<'a>> {
let field = term.field();
let field_entry = self.schema.get_field_entry(field);
let term_info = get!(self.get_term_info(term));