integer index values fixed

The code was assuming index values were binaries.
This commit is contained in:
Kresten Krab Thorup 2012-04-28 18:34:03 +02:00
parent 9d3542c4a0
commit 940fa823e2

View file

@ -435,7 +435,14 @@ to_key_range({index, Bucket, {range, <<"$key">>, StartTerm, EndTerm}}) ->
to_key_range({index, Bucket, {range, Field, StartTerm, EndTerm}}) ->
#btree_range{ from_key = to_index_key(Bucket, <<>>, Field, StartTerm),
from_inclusive = true,
to_key = to_index_key(Bucket, <<>>, Field, <<EndTerm/binary, 0>>),
to_key = to_index_key(Bucket, <<16#ff,16#ff,16#ff,16#ff,
16#ff,16#ff,16#ff,16#ff,
16#ff,16#ff,16#ff,16#ff,
16#ff,16#ff,16#ff,16#ff,
16#ff,16#ff,16#ff,16#ff,
16#ff,16#ff,16#ff,16#ff,
16#ff,16#ff,16#ff,16#ff,
16#ff,16#ff,16#ff,16#ff >>, Field, EndTerm),
to_inclusive = false };
to_key_range(Other) ->
erlang:throw({unknown_limiter, Other}).