The protocol buffers API already makes it easy to store the indexes. Querying 
them is annoying, but there's an Erlang client method to query an index that's 
pretty easy to use. Have a look at the get_index functions in 
riakc_pb_socket.erl. They're around line 700 or so.
---
Jeremiah Peschka - Founder, Brent Ozar PLF, LLC
Microsoft SQL Server MVP

On Oct 28, 2011, at 6:26 PM, Mike Oxford wrote:

> On Fri, Oct 28, 2011 at 5:36 PM, Sean Cribbs <[email protected]> wrote:
>> You can already store indexes with pbufs. Use a mapreduce with a single 
>> reduce phase of riak_kv_mapreduce:t if you want the equivalent of the http 
>> query. This is what the Erlang client does.
> 
> Ew.  That's not very friendly.
> 
> Why did you not just extend the protocol buffer to have another set of
> fields for the (optional) secondary indexes...?
> 
> Guess I'm digging into the Erlang client.  =(
> 
> -mox
> 
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to