Can't find docs/tutorial on secondary indexes for riak-erlang-client
buriwoy at gmail.com
Sun Mar 11 15:05:32 EDT 2012
Thanks for your reply Jeremiah!
I guess I am "greener" than you :)
Before posting to the list, I looked through riak documentation, the list.
I did find some postings on the subject but almost all of'em were questions
than answers. The answers I could find were so ambiguous that I wasn't able
to use them.
I've tried riakc_obj:update_metadata but got this error:
So, I hoped to find a working example. I'm too new to Erlang to read the
source and solve my problems.
On Sun, Mar 11, 2012 at 12:46 PM, Jeremiah Peschka <
jeremiah.peschka at gmail.com> wrote:
> Howdy Buri,
> 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
> get_index/4 
> get_index/5 
> get_index/6 
> get_index/7 
> 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 (
> 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?
> > Thanks,
> > -- Buriwoy
> > _______________________________________________
> > riak-users mailing list
> > riak-users at lists.basho.com
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users