Querying multiple 2i via Intersections

Jeremiah Peschka jeremiah.peschka at gmail.com
Sat Jul 27 11:32:27 EDT 2013


Both Riak Search (currently) and Yokozuna (future) provide the ability to
perform joins of multiple indices on the same bucket objects.

I find it best to think of 2i as an extension of what Riak KV already does
well - fast key based lookups.

Search and Yokozuna provide complex query semantics.

---
Jeremiah Peschka - Founder, Brent Ozar Unlimited
MCITP: SQL Server 2008, MVP
Cloudera Certified Developer for Apache Hadoop


On Sat, Jul 27, 2013 at 11:16 AM, Guido Medina <guido.medina at temetra.com>wrote:

> Rohman,
>
> 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.
>
> HTH,
>
> Guido.
>
>
> 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<http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com>
>>
>
>
> ______________________________**_________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/**mailman/listinfo/riak-users_**lists.basho.com<http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20130727/468fffde/attachment.html>


More information about the riak-users mailing list