|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terrier.structures.DirectInvertedOutputStream
public class DirectInvertedOutputStream
Writes a block direct or block inverted index, when passed appropriate posting lists.
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
logger
The logger used |
protected BitOut |
output
what to write to |
| Constructor Summary | |
|---|---|
DirectInvertedOutputStream(BitOut out)
Creates a new output stream, writing to the specified BitOut implementation. |
|
DirectInvertedOutputStream(java.lang.String filename)
Creates a new output stream, writing a BitOutputStream to the specified file. |
|
| Method Summary | |
|---|---|
void |
close()
close this object. |
byte |
getBitOffset()
Deprecated. |
BitOut |
getBitOut()
Return the underlying BitOut implementation being used by the class |
long |
getByteOffset()
Deprecated. |
BitFilePosition |
getOffset()
What is current offset? |
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 postings to the bit file. |
protected void |
writePostingNotDocid(Posting p)
Hook method for writing out the remainder of the posting |
BitIndexPointer |
writePostings(int[][] postings,
int firstId)
Write out the specified postings. |
BitIndexPointer |
writePostings(int[][] postings,
int startOffset,
int Length,
int firstId)
Write out a range of the specified postings. |
BitIndexPointer |
writePostings(IterablePosting postings)
Write out the specified postings. |
BitIndexPointer |
writePostings(IterablePosting postings,
int previousId)
Write out the specified postings, but allowing the delta for the first document to be adjusted |
BitIndexPointer |
writePostings(java.util.Iterator<Posting> iterator)
Write out the specified postings. |
BitIndexPointer |
writePostings(java.util.Iterator<Posting> iterator,
int previousId)
Write out the specified postings, but allowing the delta for the first document to be adjusted |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected BitOut output
protected static final org.apache.log4j.Logger logger
| Constructor Detail |
|---|
public DirectInvertedOutputStream(java.lang.String filename)
throws java.io.IOException
filename - Location of the file to write to
java.io.IOExceptionpublic DirectInvertedOutputStream(BitOut out)
out - BitOut implementation to write the file to| Method Detail |
|---|
public java.lang.Class<? extends IterablePosting> getPostingIteratorClass()
public BitIndexPointer writePostings(int[][] postings,
int firstId)
throws java.io.IOException
postings - The postings to write outfirstId - the (delta) value of the first docid to write out.
java.io.IOException
public BitIndexPointer writePostings(java.util.Iterator<Posting> iterator)
throws java.io.IOException
iterator - an Iterator of Posting objects
java.io.IOException
public BitIndexPointer writePostings(java.util.Iterator<Posting> iterator,
int previousId)
throws java.io.IOException
iterator - an Iterator of Posting objectspreviousId - id of the previous posting in this stream
java.io.IOException
public BitIndexPointer writePostings(IterablePosting postings,
int previousId)
throws java.io.IOException
postings - IterablePosting postings accessed through an IterablePosting objectpreviousId - id of the previous posting in this stream
java.io.IOException
public BitIndexPointer writePostings(IterablePosting postings)
throws java.io.IOException
postings - IterablePosting postings accessed through an IterablePosting object
java.io.IOException
protected void writePostingNotDocid(Posting p)
throws java.io.IOException
java.io.IOException
public BitIndexPointer writePostings(int[][] postings,
int startOffset,
int Length,
int firstId)
throws java.io.IOException
postings - The postings to write outstartOffset - The location of the first posting to write out.Length - The number of postings to be written out.firstId - the (delta) value of the first docid to write out.
java.io.IOException
protected BitIndexPointer writeNoFieldPostings(int[][] postings,
int offset,
int length,
int firstId)
throws java.io.IOException
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.public void close()
close in interface java.io.Closeablepublic BitFilePosition getOffset()
public long getByteOffset()
public byte getBitOffset()
public BitOut getBitOut()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||