PrefixCodedToInt() public static method

Returns an int from prefixCoded bytes. Rightmost bits will be zero for lower precision codes. this method can be used to decode a term's value.
if the supplied is /// not correctly prefix encoded.
public static PrefixCodedToInt ( BytesRef val ) : int
val BytesRef
return int
Esempio n. 1
0
        public virtual float ParseFloat(System.String val)
        {
            int shift = val[0] - NumericUtils.SHIFT_START_INT;

            if (shift > 0 && shift <= 31)
            {
                throw new FieldCacheImpl.StopFillCacheException();
            }
            return(NumericUtils.SortableIntToFloat(NumericUtils.PrefixCodedToInt(val)));
        }