Class BlockFieldPostingImpl

    • 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
        Returns:
        the frequencies of the term in each field of the document.
      • getFieldLengths

        public int[] getFieldLengths()
        Returns the lengths of the each field in the current document.
        Specified by:
        getFieldLengths in interface FieldPosting
        Returns:
        the lengths of the each field in the current document.
      • 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
      • toString

        public java.lang.String toString()
        Makes a human readable form of this posting
        Overrides:
        toString in class BlockPostingImpl