public class BlockPostingImpl extends BasicPostingImpl implements BlockPosting
dl, id, tf
Constructor and Description |
---|
BlockPostingImpl()
empty constructor for Writable implementation
|
BlockPostingImpl(int docid,
int frequency,
int[] _positions)
constructor
|
Modifier and Type | Method and Description |
---|---|
WritablePosting |
asWritablePosting()
Copies this posting to one free of an iterator.
|
int[] |
getPositions()
Return positions of occurrences
|
void |
readFields(DataInput in)
Reads the a single posting (not an iterable posting - use BitPostingIndex for that)
|
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).
|
getDocumentLength, getFrequency, getId, setDocumentLength, setId, setTf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDocumentLength, getFrequency, getId, setId
public BlockPostingImpl()
public BlockPostingImpl(int docid, int frequency, int[] _positions)
docid
- frequency
- _positions
- public int[] getPositions()
getPositions
in interface BlockPosting
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 BasicPostingImpl
public String toString()
toString
in class BasicPostingImpl
Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow