org.terrier.structures.indexing.singlepass
Class FieldsMemoryPostings

java.lang.Object
  extended by org.terrier.structures.indexing.singlepass.MemoryPostings
      extended by org.terrier.structures.indexing.singlepass.FieldsMemoryPostings

public class FieldsMemoryPostings
extends MemoryPostings

Class for handling posting lists containing field information in memory while indexing.

Author:
Roi Blanco

Field Summary
 
Fields inherited from class org.terrier.structures.indexing.singlepass.MemoryPostings
keyBytes, logger, maxSize, numPointers, postings, valueBytes
 
Constructor Summary
FieldsMemoryPostings()
           
 
Method Summary
 void add(java.lang.String term, int doc, int frequency, int[] fieldFrequencies)
          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.
 
Methods inherited from class org.terrier.structures.indexing.singlepass.MemoryPostings
add, finish, finish, getMemoryConsumption, getPointers, getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldsMemoryPostings

public FieldsMemoryPostings()
Method Detail

addTerms

public void addTerms(DocumentPostingList docPostings,
                     int docid)
              throws java.io.IOException
Add the terms in a DocumentPostingList to the postings in memory.

Overrides:
addTerms in class MemoryPostings
Parameters:
docPostings - DocumentPostingList containing the term information for the denoted document.
docid - Current document Identifier.
Throws:
java.io.IOException - if an I/O error occurs.

add

public void add(java.lang.String term,
                int doc,
                int frequency,
                int[] fieldFrequencies)
         throws java.io.IOException
Adds an occurrence of a term in a document to the posting in memory.

Parameters:
term - String representing the term.
doc - int containing the document identifier.
frequency - int containing the frequency of the term in the document.
fieldFrequencies - int[] contains the frequencies of the term in each field
Throws:
java.io.IOException - if an I/O error occurs.


Terrier 3.5. Copyright © 2004-2011 University of Glasgow