|
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.DirectIndexBuilder
public class DirectIndexBuilder
Builds a direct index, using field information optionally.
Constructor Summary | |
---|---|
DirectIndexBuilder()
Constructs an instance of the direct index in the default index location for the direct file. |
|
DirectIndexBuilder(Index i)
|
|
DirectIndexBuilder(java.lang.String filename)
Constructs an instance of the direct index with a non-default name for the underlying direct file. |
|
DirectIndexBuilder(java.lang.String path,
java.lang.String prefix)
Constructs an instance of the direct index using the given index path/prefix |
Method Summary | |
---|---|
FilePosition |
addDocument(int[][] terms)
Adds a document in the direct index, using field information optionally. |
void |
close()
Closes the underlying gamma compressed file. |
void |
finishedCollections()
When the indexing has reached the end of all collections, this method writes the buffers on disk and closes the corresponding files. |
void |
flushBuffer()
Deprecated. since 2.0 |
FilePosition |
getLastEndOffset()
Returns the current offset in the direct index. |
void |
resetBuffer()
Resets the internal buffer for writing data. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DirectIndexBuilder(Index i)
public DirectIndexBuilder(java.lang.String path, java.lang.String prefix)
public DirectIndexBuilder()
public DirectIndexBuilder(java.lang.String filename)
filename
- the non-default filename used
for the underlying direct file.Method Detail |
---|
public FilePosition addDocument(int[][] terms) throws java.io.IOException
terms
- int[][] the array that contains the document's terms to index.
java.io.IOException
public void finishedCollections()
public void flushBuffer()
public FilePosition getLastEndOffset()
public void resetBuffer()
public void close() throws java.io.IOException
java.io.IOException
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |