Method Int32ToPrefixCoded
Int32ToPrefixCoded(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 intToPrefixCoded() in Lucene
Declaration
public static void Int32ToPrefixCoded(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 |