public abstract class PostingInRun extends Object
Modifier and Type | Field and Description |
---|---|
protected BitIn |
postingSource
source for postings to be read from
|
protected String |
term
Current term
|
protected int |
termDf
Document frequency
|
protected int |
termTF
tf for the current posting
|
Constructor and Description |
---|
PostingInRun()
Constructs an instance of the PostingInRun.
|
Modifier and Type | Method and Description |
---|---|
void |
addToLexiconEntry(LexiconEntry le)
Add statistics for this posting onto the given LexiconEntry
|
int |
append(BitOut bos,
int last)
Writes the document data of this posting to a
BitOut
It encodes the data with the right compression methods. |
abstract int |
append(BitOut bos,
int last,
int runShift)
Writes the document data of this posting to a
BitOut
It encodes the data with the right compression methods. |
int |
getDf() |
LexiconEntry |
getLexiconEntry()
Return the LexiconEntry for this Posting
|
abstract IterablePosting |
getPostingIterator(int runShift)
Returns an IterablePosting object for the postings in this run
|
String |
getTerm() |
int |
getTF() |
void |
setDf(int df)
Setter for the document frequency.
|
void |
setPostingSource(BitIn source)
Set where the postings should be read from
|
void |
setTerm(String _term)
Setter for the term.
|
void |
setTF(int tf)
Setter for the term frequency.
|
protected BitIn postingSource
protected int termTF
protected String term
protected int termDf
public LexiconEntry getLexiconEntry()
public void addToLexiconEntry(LexiconEntry le)
public int getDf()
public void setDf(int df)
df
- int with the new document frequency.public String getTerm()
public void setTerm(String _term)
_term
- String containing the term for this posting list.public int getTF()
public void setTF(int tf)
tf
- the new term frequency.public void setPostingSource(BitIn source)
public abstract int append(BitOut bos, int last, int runShift) throws IOException
BitOut
It encodes the data with the right compression methods.
The stream is written as d1, idf(d1) , d2 - d1, idf(d2)
etc.bos
- BitOut to be written.last
- int representing the last document written in this posting.IOException
public int append(BitOut bos, int last) throws IOException
BitOut
It encodes the data with the right compression methods.
The stream is written as d1, idf(d1) , d2 - d1, idf(d2)
etc.bos
- BitOut to be written.last
- int representing the last document written in this posting.IOException
public abstract IterablePosting getPostingIterator(int runShift) throws IOException
IOException
Terrier 4.0. Copyright © 2004-2014 University of Glasgow