public static class PostingsListDocSortedPositionalPForDelta.PostingsReader extends Object implements PostingsReader
PostingsReader
for PostingsListDocSortedPositionalPForDelta
.Modifier and Type | Method and Description |
---|---|
int |
getDocno()
Returns the docno of the current posting.
|
int |
getNumberOfPostings()
Returns the number of postings in this postings list.
|
int[] |
getPositions()
Returns an array of term positions corresponding to the current posting.
|
boolean |
getPositions(TermPositions tp)
Loads a
TermPositions object corresponding to the current posting. |
PostingsList |
getPostingsList()
Returns the
PostingsList associated with this reader. |
short |
getTf()
Returns the score corresponding to the current posting.
|
boolean |
hasMorePostings()
Checks to see if there are any more postings to be read.
|
boolean |
nextPosting(Posting p)
Reads the next posting, consuming it from the stream of postings.
|
int |
peekNextDocno()
Returns the docno of the next posting, without consuming it from the stream of postings.
|
short |
peekNextTf()
Returns the score of the next posting, without consuming it from the stream of postings.
|
void |
reset()
Resets this object to start reading from the first posting.
|
public int getDocno()
PostingsReader
getDocno
in interface PostingsReader
public int getNumberOfPostings()
PostingsReader
getNumberOfPostings
in interface PostingsReader
public int[] getPositions()
PostingsReader
getPositions
in interface PostingsReader
public boolean getPositions(TermPositions tp)
PostingsReader
TermPositions
object corresponding to the current posting. This is an optional
operation valid only for postings that store positional information.getPositions
in interface PostingsReader
false
otherwisepublic PostingsList getPostingsList()
PostingsReader
PostingsList
associated with this reader.getPostingsList
in interface PostingsReader
PostingsList
associated with this readerpublic short getTf()
PostingsReader
getTf
in interface PostingsReader
public boolean hasMorePostings()
PostingsReader
hasMorePostings
in interface PostingsReader
true
if there are any more postings to be read, false
otherwisepublic boolean nextPosting(Posting p)
PostingsReader
nextPosting
in interface PostingsReader
p
- object for holding the postingtrue
if posting successfully read, false
otherwisepublic int peekNextDocno()
PostingsReader
peekNextDocno
in interface PostingsReader
public short peekNextTf()
PostingsReader
peekNextTf
in interface PostingsReader
public void reset()
PostingsReader
reset
in interface PostingsReader