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?


Thanks,
Rohman 

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?
> 
>
Guido.
> 
> 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
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
[1]
>>> 
>>> _______________________________________________
>>>
riak-users mailing list
>>> riak-users at lists.basho.com
>>>
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
[1]
>> 
>> _______________________________________________
>> riak-users
mailing list
>> riak-users at lists.basho.com
>>
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com [1]
>

> _______________________________________________
> riak-users mailing
list
> riak-users at lists.basho.com
>
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
[1]

-- 

 		 [2]

 ANTONIO ROHMAN FERNANDEZ
CEO, Founder & Lead
Engineer
rohman at mahalostudio.com 		 
 PROJECTS
MaruBatsu.es
[3]
PupCloud.com [4]
Wedding Album [5] 

 

Links:
------
[1]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
[2]
http://mahalostudio.com
[3] http://marubatsu.es
[4]
http://pupcloud.com
[5] http://wedding.mahalostudio.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20130727/9cb76fed/attachment.html>


More information about the riak-users mailing list