Method Int32ToPrefixCodedBytes
Int32ToPrefixCodedBytes(Int32, Int32, BytesRef)
Returns prefix coded bits after reducing the precision by shift
bits.
This is method is used by NumericTokenStream.
After encoding, bytes.Offset
will always be 0.
NOTE: This was intToPrefixCodedBytes() in Lucene
Declaration
public static void Int32ToPrefixCodedBytes(int val, int shift, BytesRef bytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | val | The numeric value |
System.Int32 | shift | How many bits to strip from the right |
BytesRef | bytes | Will contain the encoded value |