Querying multiple 2i via Intersections

Guido Medina guido.medina at temetra.com
Sat Jul 27 11:16:53 EDT 2013


I think the reason for this is that the cluster will have to do the 
whole intersection in memory, 2i only provides queries for 1 single 
index and then return that result to either the client streaming or not, 
intersection indeed will require a MapReduce job to get a hold of both 
lists and intersect it, honestly, I wish that was possible, I think 
that's why I'm learning Erlang at the moment, we all wanted "join" like 
functionality with 2i to be honest but I don't think that is going to 
happen before version 1.5 if ever.

If you noticed, Riak 1.4 added 2i streaming which IMHO is like moving 
farer away from handling results in memory, if you get the point of what 
I mean. Join 2i queries in Riak will be an issue for a long time.



On 27/07/13 14:20, Antonio Rohman Fernandez wrote:
> Hi there,
> I didn't fully check the new release notes yet, but I guess that Riak 1.4 doesn't have the ability to query multiple 2i at the same time... how difficult may be to implement a multiple 2i query via their intersecting items in their arrays? Maybe we could have this in future versions?
> I normally do this with scripts before doing a MapReduce, if the data I want to look for is having 2 indexes conditions, I get the array of items of each 2i query, then get only the items found on both arrays and use it as a MapReduce input list.
> However, done in my app's side is a bit costly as Riak needs to give me the full items arrays and then I need to process them to find repeated keys.
> I really wish for Riak to be able to query multiple 2i soon as it will help a lot.
> Merci,
> Rohman
> Sent from my iPhone
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

More information about the riak-users mailing list