Class BasicIterablePostingDocidOnly
- java.lang.Object
-
- org.terrier.structures.postings.BasicPostingImpl
-
- org.terrier.structures.postings.bit.BasicIterablePosting
-
- org.terrier.structures.postings.bit.BasicIterablePostingDocidOnly
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Serializable,java.lang.AutoCloseable,org.apache.hadoop.io.Writable,IterablePosting,Posting,WritablePosting
public class BasicIterablePostingDocidOnly extends BasicIterablePosting
Posting iterator class that only returns identifiers, not frequencies. This differs fromBasicIterablePostingin that only ids are recorded.- Since:
- 3.0
- Author:
- Craig Macdonald
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.terrier.structures.postings.bit.BasicIterablePosting
bitFileReader, doi, numEntries
-
Fields inherited from class org.terrier.structures.postings.BasicPostingImpl
dl, id, tf
-
Fields inherited from interface org.terrier.structures.postings.IterablePosting
END_OF_LIST, EOL
-
-
Constructor Summary
Constructors Constructor Description BasicIterablePostingDocidOnly()Create a new posting iteratorBasicIterablePostingDocidOnly(BitIn _bitFileReader, int _numEntries, DocumentIndex _doi)Create a new posting iterator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intnext()Move this iterator to the next posting.-
Methods inherited from class org.terrier.structures.postings.bit.BasicIterablePosting
asWritablePosting, close, endOfPostings, getDocumentLength, next, toString
-
Methods inherited from class org.terrier.structures.postings.BasicPostingImpl
getFrequency, getId, readFields, setDocumentLength, setId, setTf, write
-
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
getFrequency, getId
-
-
-
-
Constructor Detail
-
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
-
-
Method Detail
-
next
public int next() throws java.io.IOExceptionMove this iterator to the next posting.- Specified by:
nextin interfaceIterablePosting- Overrides:
nextin classBasicIterablePosting- Returns:
- id of next posting, or EOL if end of posting list.
- Throws:
java.io.IOException
-
-