Class BlockFieldDocumentPostingList

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.hadoop.io.Writable

    public class BlockFieldDocumentPostingList
    extends FieldDocumentPostingList
    BlockFieldDocumentPostingList class
    See Also:
    Serialized Form
    • Field Detail

      • term_blocks

        protected final gnu.trove.THashMap<java.lang.String,​gnu.trove.TIntHashSet> term_blocks
        mapping term to blockids in this document
      • blockCount

        protected int blockCount
        number of blocks in this document. usually equal to document length, but perhaps less
    • Constructor Detail

      • BlockFieldDocumentPostingList

        public BlockFieldDocumentPostingList​(int NUM_FIELDS)
        Constructs an instance of BlockFieldDocumentPostingList.
        Parameters:
        NUM_FIELDS -
    • Method Detail

      • getBlocks

        public int[] getBlocks​(java.lang.String term)
        Get the blocks for the specified term
      • insert

        public void insert​(java.lang.String t,
                           int fieldId,
                           int blockId)
        Insert a term into this document, occurs at given block id, and in the given field
      • insert

        public void insert​(java.lang.String t,
                           int[] fieldIds,
                           int blockId)
        Insert a term into this document, occurs at given block id, and in the given fields
      • insert

        public void insert​(int tf,
                           java.lang.String t,
                           int[] fieldIds,
                           int blockId)
        Insert a term into this document tf times, occurs at given block id, and in the given fields
      • readFields

        public void readFields​(java.io.DataInput in)
                        throws java.io.IOException
        Specified by:
        readFields in interface org.apache.hadoop.io.Writable
        Overrides:
        readFields in class FieldDocumentPostingList
        Throws:
        java.io.IOException
      • write

        public void write​(java.io.DataOutput out)
                   throws java.io.IOException
        Specified by:
        write in interface org.apache.hadoop.io.Writable
        Overrides:
        write in class FieldDocumentPostingList
        Throws:
        java.io.IOException