public class Posting extends Object
TF, Nt
, and the sequence [doc, tf]
Modifier and Type | Field and Description |
---|---|
protected MemorySBOS |
docIds
The compressed in-memory object holding the sequence doc_id, idf
|
protected int |
lastInt
Last document inserted in the posting
|
protected int |
Nt
The document frequency
|
protected int |
TF
The term frequency
|
Constructor and Description |
---|
Posting() |
Modifier and Type | Method and Description |
---|---|
int |
getDocF() |
MemorySBOS |
getDocs() |
int |
getSize()
Returns the size of the underlying buffer representing this posting set.
|
int |
getTF() |
int |
insert(int doc,
int freq)
Inserts a new document in the posting list.
|
void |
setDocF(int docF)
Set the document frequency the number of documents this term occurs in.
|
void |
setDocs(MemorySBOS docs)
Sets the document data compressed object.
|
void |
setTF(int tf)
Sets the term frequency in the run.
|
int |
writeFirstDoc(int docId,
int freq)
Writes the first document in the posting list.
|
protected int TF
protected int Nt
protected MemorySBOS docIds
protected int lastInt
public int writeFirstDoc(int docId, int freq) throws IOException
docId
- the document identifier.freq
- the frequency of the term in the document.IOException
- if an I/O error ocurrs.public int insert(int doc, int freq) throws IOException
doc
- the document identifier.freq
- the frequency of the term in the document.IOException
- if and I/O error occurs.public int getTF()
public MemorySBOS getDocs()
public void setTF(int tf)
tf
- the term frequency.public void setDocs(MemorySBOS docs)
docs
- public int getDocF()
public void setDocF(int docF)
docF
- the document frequency.public int getSize()
Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow