Interface NumericFieldWriter.Encoder

Enclosing interface:
NumericFieldWriter

public static interface NumericFieldWriter.Encoder
Per-block encoder for numeric values and ordinals.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    encodeBlock(long[] values, int blockSize, org.apache.lucene.store.IndexOutput data)
    Encodes a block of numeric values.
    void
    encodeOrdinals(long[] values, org.apache.lucene.store.IndexOutput data, int bitsPerOrd)
    Encodes a block of ordinal values using a fixed number of bits per ordinal.
  • Method Details

    • encodeBlock

      void encodeBlock(long[] values, int blockSize, org.apache.lucene.store.IndexOutput data) throws IOException
      Encodes a block of numeric values.
      Parameters:
      values - the values to encode; only the first blockSize entries are valid
      blockSize - the number of valid values in the array
      data - the output to write compressed bytes to
      Throws:
      IOException
    • encodeOrdinals

      void encodeOrdinals(long[] values, org.apache.lucene.store.IndexOutput data, int bitsPerOrd) throws IOException
      Encodes a block of ordinal values using a fixed number of bits per ordinal.
      Parameters:
      values - the ordinal values to encode
      data - the output to write compressed bytes to
      bitsPerOrd - the number of bits per ordinal
      Throws:
      IOException