Terrier IR Platform
2.2.1

uk.ac.gla.terrier.structures.indexing.singlepass
Class FieldPosting

java.lang.Object
  extended by uk.ac.gla.terrier.structures.indexing.singlepass.Posting
      extended by uk.ac.gla.terrier.structures.indexing.singlepass.FieldPosting

public class FieldPosting
extends Posting

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

Author:
Roi Blanco

Constructor Summary
FieldPosting()
           
 
Method Summary
 int insert(int doc, int freq, int fieldScore)
          Inserts a new document in the posting list.
 void writeFirstDoc(int doc, int frequency, int fieldScore)
          Writes the first document in the posting list.
 
Methods inherited from class uk.ac.gla.terrier.structures.indexing.singlepass.Posting
getDocF, getDocs, getTF, insert, setDocF, setDocs, setTF, writeFirstDoc
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldPosting

public FieldPosting()
Method Detail

writeFirstDoc

public void writeFirstDoc(int doc,
                          int frequency,
                          int fieldScore)
                   throws java.io.IOException
Writes the first document in the posting list.

Parameters:
doc - the document identifier.
frequency - the frequency of the term in the document.
fieldScore - field score for the term in the document.
Throws:
java.io.IOException - if an I/O error ocurrs.

insert

public int insert(int doc,
                  int freq,
                  int fieldScore)
           throws java.io.IOException
Inserts a new document in the posting list. Document insertions must be done in order.

Parameters:
doc - the document identifier.
freq - the frequency of the term in the document.
fieldScore - field score for the term in the document.
Returns:
the updated term frequency.
Throws:
java.io.IOException - if and I/O error occurs.

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow