Module org.elasticsearch.server
Interface NumericFieldWriter.Encoder
- Enclosing interface:
NumericFieldWriter
public static interface NumericFieldWriter.Encoder
Per-block encoder for numeric values and ordinals.
-
Method Summary
Modifier and TypeMethodDescriptionvoidencodeBlock(long[] values, int blockSize, org.apache.lucene.store.IndexOutput data) Encodes a block of numeric values.voidencodeOrdinals(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 firstblockSizeentries are validblockSize- the number of valid values in the arraydata- 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 encodedata- the output to write compressed bytes tobitsPerOrd- the number of bits per ordinal- Throws:
IOException
-