Class DirectMonotonicWriter

  • public final class DirectMonotonicWriter
    extends Object
    Write monotonically-increasing sequences of integers. This writer splits data into blocks and then for each block, computes the average slope, the minimum value and only encode the delta from the expected value using a DirectWriter.
    See Also:
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • Method Detail

      • finish

        public void finish()
                    throws IOException
        This must be called exactly once after all values have been added.
      • getInstance

        public static DirectMonotonicWriter getInstance​(IndexOutput metaOut,
                                                        IndexOutput dataOut,
                                                        long numValues,
                                                        int blockShift)
        Returns an instance suitable for encoding numValues into monotonic blocks of 2blockShift values. Metadata will be written to metaOut and actual data to dataOut.