public class FieldPostingImpl extends BasicPostingImpl implements FieldPosting
dl, id, tf
Constructor and Description |
---|
FieldPostingImpl()
default constructor
|
FieldPostingImpl(int _fieldCount)
constructor
|
FieldPostingImpl(int[] _fieldFrequencies)
constructor
|
FieldPostingImpl(int id,
int tf,
int _fieldCount)
constructor
|
FieldPostingImpl(int id,
int tf,
int[] _fieldFrequencies)
constructor
|
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
|
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).
|
getDocumentLength, getFrequency, getId, setDocumentLength, setId, setTf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDocumentLength, getFrequency, getId, setId
public FieldPostingImpl()
public FieldPostingImpl(int id, int tf, int _fieldCount)
id
- tf
- _fieldCount
- public FieldPostingImpl(int id, int tf, int[] _fieldFrequencies)
id
- tf
- _fieldFrequencies
- public FieldPostingImpl(int[] _fieldFrequencies)
_fieldFrequencies
- public FieldPostingImpl(int _fieldCount)
_fieldCount
- public int[] getFieldFrequencies()
getFieldFrequencies
in interface FieldPosting
public int[] getFieldLengths()
getFieldLengths
in interface FieldPosting
public void setFieldLengths(int[] fl)
setFieldLengths
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
BasicPostingImpl
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