|
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.indexing.DocumentIndexBuilder
public class DocumentIndexBuilder
A builder for the document index.
Constructor Summary | |
---|---|
DocumentIndexBuilder()
Deprecated. |
|
DocumentIndexBuilder(Index i)
Construct a DocumentIndex associated with the specified index |
|
DocumentIndexBuilder(java.lang.String filename)
A constructor of a document index from a given filename. |
|
DocumentIndexBuilder(java.lang.String path,
java.lang.String prefix)
Constructor using index path and prefix. |
Method Summary | |
---|---|
void |
addEntryToBuffer(java.lang.String docno,
int docLength)
Adds to the index a new entry, giving to it the next available document id. |
void |
addEntryToBuffer(java.lang.String docno,
int docLength,
FilePosition directIndexOffset)
Adds to the index a new entry, giving to it the next available document id. |
void |
close()
Closes the random access file. |
void |
finishedCollections()
Closes the underlying file after finished processing the collections. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocumentIndexBuilder()
public DocumentIndexBuilder(Index i)
i
- Index being constructedpublic DocumentIndexBuilder(java.lang.String path, java.lang.String prefix)
path
- path to the indexprefix
- filename prefix of the indexpublic DocumentIndexBuilder(java.lang.String filename)
filename
- String the filename of the document index,
with an extensionMethod Detail |
---|
public void addEntryToBuffer(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.
ArrayOutOfBoundsException
- The docno being written is too longpublic void addEntryToBuffer(java.lang.String docno, int docLength) throws java.io.IOException
docno
- String the document number.docLength
- int the number of indexed tokens in the document.
java.io.IOException
- Throws an exception in the
case of an IO error.public void close()
public void finishedCollections()
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |