org.terrier.structures.postings
Class BasicIterablePostingDocidOnly
java.lang.Object
org.terrier.structures.postings.BasicPostingImpl
org.terrier.structures.postings.BasicIterablePosting
org.terrier.structures.postings.BasicIterablePostingDocidOnly
- All Implemented Interfaces:
- java.io.Closeable, org.apache.hadoop.io.Writable, IterablePosting, Posting, WritablePosting
public class BasicIterablePostingDocidOnly
- extends BasicIterablePosting
Posting iterator class that only returns identifiers, not frequencies.
This differs from BasicIterablePosting
in that only ids are
recorded.
- Since:
- 3.0
- Author:
- Craig Macdonald
Method Summary |
int |
getFrequency()
Returns 0. |
int |
next()
Move this iterator to the next posting. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.terrier.structures.postings.Posting |
getId, setId |
BasicIterablePostingDocidOnly
public BasicIterablePostingDocidOnly()
- Create a new posting iterator
BasicIterablePostingDocidOnly
public BasicIterablePostingDocidOnly(BitIn _bitFileReader,
int _numEntries,
DocumentIndex _doi)
throws java.io.IOException
- Create a new posting iterator
- Parameters:
_bitFileReader
- BitIn to read the postings from_numEntries
- number of postings in the list_doi
- document index to use to satisfy getDocumentLength()
- Throws:
java.io.IOException
- thrown in an IO exception occurs
next
public int next()
throws java.io.IOException
- Move this iterator to the next posting.
- Specified by:
next
in interface IterablePosting
- Overrides:
next
in class BasicIterablePosting
- Returns:
- id of next posting, or EOL if end of posting list
- Throws:
java.io.IOException
getFrequency
public int getFrequency()
- Returns 0.
- Specified by:
getFrequency
in interface Posting
- Overrides:
getFrequency
in class BasicPostingImpl
- Returns:
- frequency of posting, in tokens
Terrier 3.5. Copyright © 2004-2011 University of Glasgow