public interface PostingsReader
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 posting)
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.
|
int getDocno()
int getNumberOfPostings()
int[] getPositions()
boolean getPositions(TermPositions tp)
TermPositions
object corresponding to the current posting. This is an optional
operation valid only for postings that store positional information.false
otherwisePostingsList getPostingsList()
PostingsList
associated with this reader.PostingsList
associated with this readershort getTf()
boolean hasMorePostings()
true
if there are any more postings to be read, false
otherwiseboolean nextPosting(Posting posting)
posting
- object for holding the postingtrue
if posting successfully read, false
otherwiseint peekNextDocno()
short peekNextTf()
void reset()