public class BlockFieldIterablePosting extends BasicIterablePosting implements BlockPosting, FieldPosting
bitFileReader, doi, numEntries
dl, id, tf
EOL
Constructor and Description |
---|
BlockFieldIterablePosting(BitIn _bitFileReader,
int _numEntries,
DocumentIndex doi,
int _fieldCount)
Make a new posting iterator that is read from a BitIn stream.
|
BlockFieldIterablePosting(int _fieldCount)
Make a new posting that can be loaded using Writable methods
|
Modifier and Type | Method and Description |
---|---|
WritablePosting |
asWritablePosting()
Copies this posting to one free of an iterator.
|
int[] |
getFieldFrequencies()
Returns the frequencies of the term in each field of the document
|
int[] |
getFieldLengths()
Returns the lengths of the each fields in the current document
|
int[] |
getPositions()
Return positions of occurrences
|
int |
next()
Move this iterator to the next posting.
|
void |
readFields(DataInput in)
Reads the a single posting (not an iterable posting - use BitPostingIndex for that)
|
void |
setFieldLengths(int[] fl)
.
|
String |
toString()
Makes a human readable form of this posting
|
void |
write(DataOutput out)
Writes the current posting (not an iterable posting - use DirectInvertedOutputStream for that).
|
close, endOfPostings, getDocumentLength, next
getFrequency, getId, setDocumentLength, setId, setTf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDocumentLength, getFrequency, getId, setId
public BlockFieldIterablePosting(int _fieldCount)
_fieldCount
- number of fields to expectpublic BlockFieldIterablePosting(BitIn _bitFileReader, int _numEntries, DocumentIndex doi, int _fieldCount) throws IOException
_bitFileReader
- BitIn stream containing postings_numEntries
- number of postings to read from streamdoi
- DocumentIndex to read document and field lengths from_fieldCount
- number of fields to expectIOException
public int next() throws IOException
next
in interface IterablePosting
next
in class BasicIterablePosting
IOException
public int[] getPositions()
getPositions
in interface BlockPosting
public int[] getFieldFrequencies()
getFieldFrequencies
in interface FieldPosting
public void setFieldLengths(int[] fl)
setFieldLengths
in interface FieldPosting
public int[] getFieldLengths()
getFieldLengths
in interface FieldPosting
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class BasicPostingImpl
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
write
in class BasicPostingImpl
IOException
public WritablePosting asWritablePosting()
asWritablePosting
in interface Posting
asWritablePosting
in class BasicIterablePosting
public String toString()
toString
in class BasicPostingImpl
Terrier 4.0. Copyright © 2004-2014 University of Glasgow