KEY - public abstract class LexiconOutputStream<KEY> extends Object implements Closeable
| Modifier and Type | Field and Description | 
|---|---|
| protected DataOutput | lexiconStreamA data input stream to read from the bufferInput. | 
| protected long | numPointersWrittenPointer written - the sum of the Nts | 
| protected int | numTermsWritten | 
| protected long | numTokensWrittencollection length - the sum of the TFs | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | LexiconOutputStream() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close()Closes the lexicon stream. | 
| long | getNumberOfPointersWritten()Returns the number of pointers there would be in an inverted index built using this lexicon (thus far). | 
| int | getNumberOfTermsWritten()Returns the number of terms written so far by this LexiconOutputStream | 
| long | getNumberOfTokensWritten()Returns the number of tokens there are in the entire collection represented by this lexicon (thus far). | 
| protected void | incrementCounters(EntryStatistics t) | 
| abstract int | writeNextEntry(KEY _key,
              LexiconEntry _value)Writes a lexicon entry. | 
protected DataOutput lexiconStream
protected long numPointersWritten
protected long numTokensWritten
protected int numTermsWritten
public void close()
close in interface Closeableclose in interface AutoCloseablepublic abstract int writeNextEntry(KEY _key, LexiconEntry _value) throws IOException
_key - the key - usually the term_value - the lexicon entry valueIOException - if an I/O error occursprotected void incrementCounters(EntryStatistics t)
public long getNumberOfPointersWritten()
public long getNumberOfTokensWritten()
public int getNumberOfTermsWritten()
Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow