uk.ac.gla.terrier.structures.indexing.singlepass
Class BlockPosting
java.lang.Object
uk.ac.gla.terrier.structures.indexing.singlepass.Posting
uk.ac.gla.terrier.structures.indexing.singlepass.BlockPosting
- Direct Known Subclasses:
- BlockFieldPosting
public class BlockPosting
- extends Posting
Class representing a posting list in memory with block information
It keeps the information for DF, TF
, and the sequence [doc, tf, blockCount, [blockId]]
- Author:
- Roi Blanco
Method Summary |
int |
insert(int doc,
int freq,
int[] blockids)
Inserts a new document in the posting list. |
void |
writeFirstDoc(int doc,
int frequency,
int[] blockids)
Writes the first document in the posting list. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlockPosting
public BlockPosting()
writeFirstDoc
public void writeFirstDoc(int doc,
int frequency,
int[] blockids)
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.blockids
- the blockids for all the term
- Throws:
java.io.IOException
- if an I/O error ocurrs.
insert
public int insert(int doc,
int freq,
int[] blockids)
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.blockids
- the blockids for all the term
- Returns:
- the updated term frequency.
- Throws:
java.io.IOException
- if and I/O error occurs.
Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow