Can't find docs/tutorial on secondary indexes for riak-erlang-client
jeremiah.peschka at gmail.com
Sun Mar 11 14:46:52 EDT 2012
I'm not an Erlang expert, or even something remotely resembling competent with Erlang, however, I believe I have tracked down what you're looking for.
You can use one of the riakc_pb_socket:get_index functions to pull back data from an index. If you look at the source on the methods, you'll see that they're just wrappers around a MapReduce call. As far as setting the values... I think you'll have to make a call to riakc_obj:update_metadata and add the index metadata in by hand, but I could be wrong on that one.
If I'm wrong, hopefully someone on the list will correct my Erlang-y ignorance.
Jeremiah Peschka - Managing Director, Brent Ozar PLF, LLC
Microsoft SQL Server MVP
On Mar 11, 2012, at 11:06 AM, Buri Arslon wrote:
> Hi everybody,
> I can't find any tutorial or docs on secondary indexes. Here (http://lists.basho.com/pipermail/riak-users_lists.basho.com/2011-October/005952.html) it was stated that the docs would be updated but I can't find it.
> I just wanted a doc which explains how to use secondary indexes with native erlang client. Riak docs have examples for http api but not for erlang client.
> Can anyone refer me to appropriate docs/tutorials?
> -- Buriwoy
> riak-users mailing list
> riak-users at lists.basho.com
More information about the riak-users