K - public class FileRunIterator<K extends PostingInRun> extends RunIterator
| Modifier and Type | Field and Description | 
|---|---|
| protected int | currentPostingCurrent Posting List number | 
| protected int | maxSizemax number of pointers any term in the run | 
| protected BitIn | mbisInput stream for reading the run. | 
| protected int | sizeNumber of postings in this run | 
| protected DataInputStream | stringDISInput stream for reading the terms. | 
flushNo, numberOfFields, posting, postingClass| Constructor and Description | 
|---|
| FileRunIterator(String filename,
               String termsFile,
               int runNo,
               Class<? extends PostingInRun> _postingInRunClass,
               int fieldCount)Load a new run from files. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close()Closes the run files being processed | 
| boolean | hasNext()Are there more posting to process in this run? | 
| PostingInRun | next()Move to the next posting in this run | 
| String | readString()Reads the String identifying a term from the underlying stream. | 
| int | readTermFrequency()Reads the term frequency for the current posting, and aligns the stream. | 
createPosting, current, getRunNo, removeprotected BitIn mbis
protected DataInputStream stringDIS
protected int size
protected int currentPosting
protected int maxSize
public FileRunIterator(String filename, String termsFile, int runNo, Class<? extends PostingInRun> _postingInRunClass, int fieldCount) throws Exception
filename - the filename of the file containing the posting liststermsFile - the filename of the file containing the term namesrunNo - the number of this run_postingInRunClass - the class that all postings in this class haveExceptionpublic void close()
           throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class RunIteratorIOExceptionpublic boolean hasNext()
hasNext in interface Iterator<PostingInRun>hasNext in class RunIteratorpublic PostingInRun next()
next in interface Iterator<PostingInRun>next in class RunIteratorpublic int readTermFrequency()
                      throws IOException
IOException - if an I/O error occurs.public String readString() throws IOException
IOException - if an I/O error occurs.Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow