|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.structures.indexing.singlepass.MemoryPostings
public class MemoryPostings
Class for handling Simple posting lists in memory while indexing.
Constructor Summary | |
---|---|
MemoryPostings()
|
Method Summary | |
---|---|
void |
add(java.lang.String term,
int doc,
int frequency)
Adds an occurrence of a term in a document to the posting in memory. |
void |
addTerms(DocumentPostingList docPostings,
int docid)
Add the terms in a DocumentPostingList to the postings in memory. |
void |
finish(RunWriter runWriter)
Triggers the writing of the postings in memory to the specified RunWriter. |
void |
finish(java.lang.String[] file)
Triggers the writing of the postings in memory to disk. |
long |
getPointers()
Returns the number of pointers in this posting list. |
int |
getSize()
Returns the number of terms in this posting list. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MemoryPostings()
Method Detail |
---|
public void addTerms(DocumentPostingList docPostings, int docid) throws java.io.IOException
docPostings
- DocumentPostingList containing the term information for the denoted document.docid
- Current document Identifier.
java.io.IOException
- if an I/O error occurs.public void add(java.lang.String term, int doc, int frequency) throws java.io.IOException
term
- String representing the term.doc
- int containing the document identifier.frequency
- int containing the frequency of the term in the document.
java.io.IOException
- if an I/O error occurs.public void finish(java.lang.String[] file) throws java.io.IOException
file
- name of the file to write the postings.
java.io.IOException
- if an I/O error occurs.public void finish(RunWriter runWriter) throws java.io.IOException
runWriter
-
java.io.IOException
public int getSize()
public long getPointers()
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |