public class DocumentIndexBuilder extends Object
| Modifier and Type | Field and Description | 
|---|---|
protected DataOutputStream | 
dos
The stream to which we write the data. 
 | 
protected IndexOnDisk | 
index
index object of the index currently being created 
 | 
protected static org.slf4j.Logger | 
logger
The logger used 
 | 
protected int | 
numberOfDocumentIndexEntries
The total number of entries in the document index. 
 | 
protected String | 
structureName
Name of the structure to which we're writing 
 | 
| Constructor and Description | 
|---|
DocumentIndexBuilder(IndexOnDisk i,
                    String _structureName)
Construct a DocumentIndex associated with the specified index 
 | 
| Modifier and Type | Method and Description | 
|---|---|
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. 
 | 
protected static final org.slf4j.Logger logger
protected String structureName
protected DataOutputStream dos
protected int numberOfDocumentIndexEntries
protected IndexOnDisk index
public DocumentIndexBuilder(IndexOnDisk i, String _structureName)
i - Index being constructed_structureName - the name of the structure being createdpublic void addEntryToBuffer(org.apache.hadoop.io.Writable die)
                      throws IOException
die - The document index entry being writtenIOException - Throws an exception in the 
                        case of an IO error.public void close()
public void finishedCollections()
Terrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow