Querying 2i using erlang native api

luigi max ldc.drake at gmail.com
Fri Jul 19 16:21:48 EDT 2013

I have been looking around the Riak docs and as many other places that I
can think of and I can't seem to find how to query 2i with the Riak
internal erlang client.

I can do a query to 2i with the http interface with:


and it returns


I can create an entry with the following code (loaded into riak):

Robj =  riak_object:new(<<"TEST">>, <<"set2i">>, void, "application/json"),
Lst = [{"pos_int", 5}],
Meta = dict:store(<<"index">>,Lst, dict:new()),
I2obj = riak_object:update_metadata(Robj, Meta)
{ok,C} = riak:local_client().

This works nicely, but the problem I have is with trying to figure out how
to do the same query using the native api for riak. The documentation for
anything to do with the riak internal client is effectively non existent.

What all I need:

   - information on how to do a integer range query
   - information on my other 2i query options, in case I need it

Any help is much appreciated.

By Luke Harvey;

LinkedIn Profile:  http://www.linkedin.com/in/lukeharvey00
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20130719/8085adce/attachment.html>

More information about the riak-users mailing list