org.terrier.structures.indexing.singlepass
Class SimplePostingInRun

java.lang.Object
  extended by org.terrier.structures.indexing.singlepass.PostingInRun
      extended by org.terrier.structures.indexing.singlepass.SimplePostingInRun
Direct Known Subclasses:
BlockPostingInRun, FieldPostingInRun

public class SimplePostingInRun
extends PostingInRun

Class holding the information for a posting list read from a previously written run at disk. Used in the merging phase of the Single pass inversion method. This class knows how to append itself to a BitOut and it represents the simpler class of posting (TF, df, [docid, tf])

Author:
Roi Blanco

Nested Class Summary
protected  class SimplePostingInRun.PIRPostingIterator
           
 
Field Summary
 
Fields inherited from class org.terrier.structures.indexing.singlepass.PostingInRun
postingSource, term, termDf, termTF
 
Constructor Summary
SimplePostingInRun()
          Constructor for the class.
 
Method Summary
 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.
 IterablePosting getPostingIterator(int runShift)
          Returns an IterablePosting object for the postings in this run
 
Methods inherited from class org.terrier.structures.indexing.singlepass.PostingInRun
addToLexiconEntry, append, getDf, getLexiconEntry, getTerm, getTF, setDf, setPostingSource, setTerm, setTF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePostingInRun

public SimplePostingInRun()
Constructor for the class.

Method Detail

append

public int append(BitOut bos,
                  int last,
                  int runShift)
           throws java.io.IOException
Writes the document data of this posting to a BitOut It encodes the data with the right compression methods. The stream is written as d1, idf(d1) , d2 - d1, idf(d2) etc.

Specified by:
append in class PostingInRun
Parameters:
bos - BitOut to be written.
last - int representing the last document written in this posting.
runShift - int representing the last document read document read in this posting stream.
Returns:
The last posting written.
Throws:
java.io.IOException

getPostingIterator

public IterablePosting getPostingIterator(int runShift)
                                   throws java.io.IOException
Description copied from class: PostingInRun
Returns an IterablePosting object for the postings in this run

Specified by:
getPostingIterator in class PostingInRun
Throws:
java.io.IOException


Terrier 3.5. Copyright © 2004-2011 University of Glasgow