org.terrier.structures.indexing.singlepass
Class BlockFieldPostingInRun

java.lang.Object
  extended by org.terrier.structures.indexing.singlepass.PostingInRun
      extended by org.terrier.structures.indexing.singlepass.SimplePostingInRun
          extended by org.terrier.structures.indexing.singlepass.BlockPostingInRun
              extended by org.terrier.structures.indexing.singlepass.BlockFieldPostingInRun

public class BlockFieldPostingInRun
extends BlockPostingInRun

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 a posting with blocks and field information (tf, df, [docid, idf, fieldScore, blockFr [blockid]])

Author:
Roi Blanco

Nested Class Summary
protected  class BlockFieldPostingInRun.bfPIRPostingIterator
           
 
Nested classes/interfaces inherited from class org.terrier.structures.indexing.singlepass.BlockPostingInRun
BlockPostingInRun.BlockPIRPostingIterator
 
Nested classes/interfaces inherited from class org.terrier.structures.indexing.singlepass.SimplePostingInRun
SimplePostingInRun.PIRPostingIterator
 
Field Summary
protected  int fieldTags
          The number of different fields that are used for indexing field information.
protected  int[] fieldTFs
           
 
Fields inherited from class org.terrier.structures.indexing.singlepass.PostingInRun
postingSource, term, termDf, termTF
 
Constructor Summary
BlockFieldPostingInRun(int _fieldTags)
          Constructor for the class.
 
Method Summary
protected static void addTo(int[] target, int[] additions)
           
 void addToLexiconEntry(LexiconEntry _le)
          Add statistics for this posting onto the given LexiconEntry
 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.
 LexiconEntry getLexiconEntry()
          Return the LexiconEntry for this Posting
 IterablePosting getPostingIterator(int runShift)
          Returns an IterablePosting object for the postings in this run
 void setTerm(java.lang.String term)
          Setter for the term.
 
Methods inherited from class org.terrier.structures.indexing.singlepass.PostingInRun
append, getDf, getTerm, getTF, setDf, setPostingSource, setTF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fieldTags

protected final int fieldTags
The number of different fields that are used for indexing field information.


fieldTFs

protected final int[] fieldTFs
Constructor Detail

BlockFieldPostingInRun

public BlockFieldPostingInRun(int _fieldTags)
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), fields, blockNo(d1), bid1, bid2, ..., d2 - d1, idf(d2), fields, blockNo(d2), ... etc

Overrides:
append in class BlockPostingInRun
Parameters:
bos - BitOut to be written.
last - int representing the last document written in this posting.
runShift - amount of delta to apply to the first posting read.
Returns:
The last posting written.
Throws:
java.io.IOException

getLexiconEntry

public LexiconEntry getLexiconEntry()
Description copied from class: PostingInRun
Return the LexiconEntry for this Posting

Overrides:
getLexiconEntry in class PostingInRun

addToLexiconEntry

public void addToLexiconEntry(LexiconEntry _le)
Description copied from class: PostingInRun
Add statistics for this posting onto the given LexiconEntry

Overrides:
addToLexiconEntry in class PostingInRun

addTo

protected static void addTo(int[] target,
                            int[] additions)

setTerm

public void setTerm(java.lang.String term)
Description copied from class: PostingInRun
Setter for the term.

Overrides:
setTerm in class PostingInRun
Parameters:
term - String containing the term for this posting list.

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

Overrides:
getPostingIterator in class BlockPostingInRun
Throws:
java.io.IOException


Terrier 3.5. Copyright © 2004-2011 University of Glasgow