Querying multiple 2i via Intersections
Antonio Rohman Fernandez
rohman at mahalostudio.com
Sat Jul 27 11:50:57 EDT 2013
Can you provide a real example on how to do that with Riak Search?
On 27.07.2013 17:44, Guido Medina wrote:
> Are you
saying that you can join two 2i indexes? Let's say you have a 2i named
"date" and another named "category" so you could get a list of modified
objects on a date and for a specific category with Riak Search?
> On 27/07/13 16:32, Jeremiah Peschka wrote:
>> 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
>> Jeremiah Peschka - Founder, Brent Ozar
>> 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:
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:
>>>> 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
>>>> I really wish for Riak to be able to query
multiple 2i soon as it will help a lot.
>>>> Sent from my iPhone
>>>> riak-users mailing
>>>> riak-users at lists.basho.com
riak-users mailing list
>>> riak-users at lists.basho.com
>> riak-users at lists.basho.com
> riak-users mailing
> riak-users at lists.basho.com
ANTONIO ROHMAN FERNANDEZ
CEO, Founder & Lead
rohman at mahalostudio.com
Wedding Album 
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users