|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terrier.structures.indexing.DocumentIndexBuilder
public class DocumentIndexBuilder
A builder for the document index.
| Field Summary | |
|---|---|
protected java.io.DataOutputStream |
dos
The stream to which we write the data. |
protected Index |
index
index object of the index currently being created |
protected static org.apache.log4j.Logger |
logger
The logger used |
protected int |
numberOfDocumentIndexEntries
The total number of entries in the document index. |
protected java.lang.String |
structureName
Name of the structure to which we're writing |
| Constructor Summary | |
|---|---|
DocumentIndexBuilder(Index i,
java.lang.String _structureName)
Construct a DocumentIndex associated with the specified index |
|
| Method Summary | |
|---|---|
void |
addEntryToBuffer(org.apache.hadoop.io.Writable die)
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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger logger
protected java.lang.String structureName
protected java.io.DataOutputStream dos
protected int numberOfDocumentIndexEntries
protected Index index
| Constructor Detail |
|---|
public DocumentIndexBuilder(Index i,
java.lang.String _structureName)
i - Index being constructed_structureName - the name of the structure being created| Method Detail |
|---|
public void addEntryToBuffer(org.apache.hadoop.io.Writable die)
throws java.io.IOException
die - The document index entry being written
java.io.IOException - Throws an exception in the
case of an IO error.public void close()
public void finishedCollections()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||