public class DocumentIndexBuilder extends Object
| Modifier and Type | Field and Description | 
|---|---|
| protected DataOutputStream | dosThe stream to which we write the data. | 
| protected IndexOnDisk | indexindex object of the index currently being created | 
| protected static org.slf4j.Logger | loggerThe logger used | 
| protected int | numberOfDocumentIndexEntriesThe total number of entries in the document index. | 
| protected String | structureNameName 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 Platform4.1. Copyright © 2004-2015, University of Glasgow