Class PostingsUtil


  • final class PostingsUtil
    extends java.lang.Object
    Utility class to encode/decode postings block.
    • Constructor Summary

      Constructors 
      Constructor Description
      PostingsUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static void readVIntBlock​(IndexInput docIn, long[] docBuffer, long[] freqBuffer, int num, boolean indexHasFreq, boolean decodeFreq)
      Read values that have been written using variable-length encoding and group-varint encoding instead of bit-packing.
      (package private) static void writeVIntBlock​(IndexOutput docOut, long[] docBuffer, long[] freqBuffer, int num, boolean writeFreqs)
      Write freq buffer with variable-length encoding and doc buffer with group-varint encoding.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PostingsUtil

        PostingsUtil()
    • Method Detail

      • readVIntBlock

        static void readVIntBlock​(IndexInput docIn,
                                  long[] docBuffer,
                                  long[] freqBuffer,
                                  int num,
                                  boolean indexHasFreq,
                                  boolean decodeFreq)
                           throws java.io.IOException
        Read values that have been written using variable-length encoding and group-varint encoding instead of bit-packing.
        Throws:
        java.io.IOException
      • writeVIntBlock

        static void writeVIntBlock​(IndexOutput docOut,
                                   long[] docBuffer,
                                   long[] freqBuffer,
                                   int num,
                                   boolean writeFreqs)
                            throws java.io.IOException
        Write freq buffer with variable-length encoding and doc buffer with group-varint encoding.
        Throws:
        java.io.IOException