several 2i in the query

Ilyushonak Barys barys_ilyushonak at troika.ru
Wed Aug 1 09:01:56 EDT 2012


Hi, riak users

I have object with two different secondary indexes - status and type. For example, I would like to query all keys with status=new AND type=gloves. 
As wiki says "In version 1.0 of Riak, index queries are only supported on one index field at a time." (http://wiki.basho.com/Secondary-Indexes---Configuration-and-Examples.html)
I would like to know: if anything changed in this field since 1.0?

I have found the following solutions for this task:
1. Create separate index value for specified pair status and type, for example {<<"index">>, [{<<"status_and_type_bin ">>, term_to_binary({new, gloves})}]}
2. Use the query result by only one index as map-reduce input pipe and filter values in MR.
3. Maybe I think too relational and should use other object structure?

Please, advise. Is there other solutions for this issue?

Regards,
Boris Ilyushonak



_______________________________________________________

The information contained in this message may be privileged and conf idential and protected from disclosure. If you are not the original intended recipient, you are hereby notified that any review, retransmission, dissemination, or other use of, or taking of any action in reliance upon, this information is prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. Thank you for your cooperation. Troika Dialog, Russia. 
If you need assistance please contact our Contact Center  (+7495) 258 0500 or go to www.troika.ru/eng/Contacts/system.wbp  






More information about the riak-users mailing list