org.terrier.structures.postings
Class BlockFieldPostingImpl

java.lang.Object
  extended by org.terrier.structures.postings.BasicPostingImpl
      extended by org.terrier.structures.postings.BlockPostingImpl
          extended by org.terrier.structures.postings.BlockFieldPostingImpl
All Implemented Interfaces:
org.apache.hadoop.io.Writable, BlockPosting, FieldPosting, Posting, WritablePosting

public class BlockFieldPostingImpl
extends BlockPostingImpl
implements FieldPosting

A writable block field posting list


Field Summary
 
Fields inherited from class org.terrier.structures.postings.BasicPostingImpl
id, tf
 
Constructor Summary
BlockFieldPostingImpl()
          default constructor
BlockFieldPostingImpl(int docid, int frequency, int[] _positions, int fieldCount)
          constructor
BlockFieldPostingImpl(int docid, int frequency, int[] _positions, int[] _fieldFrequencies)
          contructure
 
Method Summary
 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(java.io.DataInput in)
          Reads the a single posting (not an iterable posting - use BitPostingIndex for that)
 java.lang.String toString()
          Makes a human readable form of this posting
 void write(java.io.DataOutput out)
          Writes the current posting (not an iterable posting - use DirectInvertedOutputStream for that).
 
Methods inherited from class org.terrier.structures.postings.BlockPostingImpl
getPositions
 
Methods inherited from class org.terrier.structures.postings.BasicPostingImpl
getDocumentLength, getFrequency, getId, setId
 
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
getDocumentLength, getFrequency, getId, setId
 

Constructor Detail

BlockFieldPostingImpl

public BlockFieldPostingImpl()
default constructor


BlockFieldPostingImpl

public BlockFieldPostingImpl(int docid,
                             int frequency,
                             int[] _positions,
                             int[] _fieldFrequencies)
contructure

Parameters:
docid -
frequency -
_positions -
_fieldFrequencies -

BlockFieldPostingImpl

public BlockFieldPostingImpl(int docid,
                             int frequency,
                             int[] _positions,
                             int fieldCount)
constructor

Parameters:
docid -
frequency -
_positions -
fieldCount -
Method Detail

getFieldFrequencies

public int[] getFieldFrequencies()
Returns the frequencies of the term in each field of the document

Specified by:
getFieldFrequencies in interface FieldPosting

getFieldLengths

public int[] getFieldLengths()
Returns the lengths of the each fields in the current document

Specified by:
getFieldLengths in interface FieldPosting

readFields

public void readFields(java.io.DataInput in)
                throws java.io.IOException
Description copied from class: BlockPostingImpl
Reads the a single posting (not an iterable posting - use BitPostingIndex for that)

Specified by:
readFields in interface org.apache.hadoop.io.Writable
Overrides:
readFields in class BlockPostingImpl
Throws:
java.io.IOException

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Description copied from class: BlockPostingImpl
Writes the current posting (not an iterable posting - use DirectInvertedOutputStream for that). Compression using this method is not expected to be comparable to bit-level compression.

Specified by:
write in interface org.apache.hadoop.io.Writable
Overrides:
write in class BlockPostingImpl
Throws:
java.io.IOException

asWritablePosting

public WritablePosting asWritablePosting()
Description copied from class: BlockPostingImpl
Copies this posting to one free of an iterator. Kind of like a clone.

Specified by:
asWritablePosting in interface Posting
Overrides:
asWritablePosting in class BlockPostingImpl
Returns:
an identical posting, but which can be maniulated free of this iterator

toString

public java.lang.String toString()
Makes a human readable form of this posting

Overrides:
toString in class BlockPostingImpl


Terrier 3.5. Copyright © 2004-2011 University of Glasgow