|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.structures.DirectInvertedOutputStream org.terrier.structures.BlockDirectInvertedOutputStream
public class BlockDirectInvertedOutputStream
Writes a block direct or block inverted index, when passed appropriate posting lists.
Field Summary |
---|
Fields inherited from class org.terrier.structures.DirectInvertedOutputStream |
---|
logger, output |
Constructor Summary | |
---|---|
BlockDirectInvertedOutputStream(BitOut out)
Creates a new output stream, writing to the specified BitOut implementation. |
|
BlockDirectInvertedOutputStream(java.lang.String filename)
Creates a new output stream, writing a BitOutputStream to the specified file. |
Method Summary | |
---|---|
java.lang.Class<? extends IterablePosting> |
getPostingIteratorClass()
Returns the IterablePosting class to use for reading structure written by this class |
protected BitIndexPointer |
writeNoFieldPostings(int[][] postings,
int offset,
int length,
int firstId)
Writes the given block postings to the bit file. |
protected void |
writePostingNotDocid(Posting _p)
Hook method for writing out the remainder of the posting |
Methods inherited from class org.terrier.structures.DirectInvertedOutputStream |
---|
close, getBitOffset, getBitOut, getByteOffset, getOffset, writePostings, writePostings, writePostings, writePostings, writePostings, writePostings |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlockDirectInvertedOutputStream(java.lang.String filename) throws java.io.IOException
filename
- Location of the file to write to
java.io.IOException
public BlockDirectInvertedOutputStream(BitOut out)
out
- BitOut implementation to write the file toMethod Detail |
---|
public java.lang.Class<? extends IterablePosting> getPostingIteratorClass()
DirectInvertedOutputStream
getPostingIteratorClass
in class DirectInvertedOutputStream
protected BitIndexPointer writeNoFieldPostings(int[][] postings, int offset, int length, int firstId) throws java.io.IOException
writeNoFieldPostings
in class DirectInvertedOutputStream
postings
- the postings list to write.firstId
- the first identifier to write. This can be
an id plus one, or the gap of the current id and the previous one.offset
- The location of the first posting to write out.length
- The number of postings to be written out.
java.io.IOException
- if an error occurs during writing to a file.protected void writePostingNotDocid(Posting _p) throws java.io.IOException
DirectInvertedOutputStream
writePostingNotDocid
in class DirectInvertedOutputStream
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |