Can't find docs/tutorial on secondary indexes for riak-erlang-client

Daniil Churikov ddosia at gmail.com
Mon Mar 12 08:53:37 EDT 2012


Seems that i discover how to use this 2i range queries from riak_client:

> {ok, C} = riak:local_client(),
> C:get_index(<<"bucket_name">>, {range, <<"$key">>, <<"k1">>, <<"k7">>}).
> {ok, [<<"k7">>, <<"k6">>, <<"k5">>, <<"k4">>, <<"k3">>, <<"k2">>,
> <<"k1">>]}

where <<"$key">> is a special value ofr key index.
I test from shell such way:
$ curl -v -X GET
'http://localhost:8098/buckets/bucket_name/index/$key/k1/k7'

--
View this message in context: http://riak-users.197444.n3.nabble.com/Can-t-find-docs-tutorial-on-secondary-indexes-for-riak-erlang-client-tp3817052p3819157.html
Sent from the Riak Users mailing list archive at Nabble.com.




More information about the riak-users mailing list