|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.structures.DocumentIndexOutputStream
public class DocumentIndexOutputStream
A DocumentIndexOutputStream. Based on code from structures.indexing.DocumentIndexBuilder
Constructor Summary | |
---|---|
DocumentIndexOutputStream()
A default constructor for this document index output stream. |
|
DocumentIndexOutputStream(java.lang.String filename)
A constructor of a document index output stream from a given filename. |
|
DocumentIndexOutputStream(java.lang.String path,
java.lang.String prefix)
A constructor of a document index output stream from an index path and prefix. |
Method Summary | |
---|---|
void |
addEntry(java.lang.String docno,
int docLength,
FilePosition directIndexOffset)
Adds to the index a new entry, giving to it the next available document id. |
void |
addEntry(java.lang.String docno,
int docid,
int docLength,
long directIndexOffsetBytes,
byte directIndexOffsetBits)
As above, but for use when the docid is already known. |
void |
addEntry(java.lang.String docno,
int docLength,
long directIndexOffsetBytes,
byte directIndexOffsetBits)
Adds to the index a new entry, giving to it the next available document id. |
void |
close()
Closes the random access file. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocumentIndexOutputStream()
public DocumentIndexOutputStream(java.lang.String filename)
filename
- String the filename of the document index,
with an extensionpublic DocumentIndexOutputStream(java.lang.String path, java.lang.String prefix)
path
- String path to the indexprefix
- String prefix of the filenames of the indexMethod Detail |
---|
public void addEntry(java.lang.String docno, int docLength, FilePosition directIndexOffset) throws java.io.IOException
docno
- String the document number.docLength
- int the number of indexed tokens in the document.directIndexOffset
- FilePosition the ending position of the
document's entry in the direct index.
java.io.IOException
- Throws an exception in the
case of an IO error.public void addEntry(java.lang.String docno, int docLength, long directIndexOffsetBytes, byte directIndexOffsetBits) throws java.io.IOException
docno
- String the document number.docLength
- int the number of indexed tokens in the document.directIndexOffsetBytes
- long the ending bytes position of the
document's entry in the direct index.directIndexOffsetBits
- byte the ending bits position of the
document's entry in the direct index.
java.io.IOException
- Throws an exception in the
case of an IO error.public void addEntry(java.lang.String docno, int docid, int docLength, long directIndexOffsetBytes, byte directIndexOffsetBits) throws java.io.IOException
java.io.IOException
public void close()
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |