Re: 2i, search or something else for most efficient "range" lookup

2013-08-24 Thread Michael Uvarov
Index by endVal and select a range from Value to undefined with max_results=1. ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

MapReduce with 2i input filters

2013-08-24 Thread Gints Gailītis
Hi Riak users! I'm looking at the sample here: http://docs.basho.com/riak/latest/dev/using/2i/ and wondering if there is a way to use more complicated logic when using 2i input filters to limit the input to a MapReduce function. For example, can I do stuff like "index1_bin in range[1,10] OR in ra

Re: MapReduce with 2i input filters

2013-08-24 Thread Gints Gailītis
I guess it's bit hard to read the 3 samples I asked for, I'll spell them out like this: 1) index1_bin in range[1,10] OR in range [21:30] 2) index1_bin in range [1;50] AND index2_bin in range[5;10] 3) key in range[aaa,zzz] AND index1_bin in range[1,10] (where key is the actual key from the objects k

Re: 2i, search or something else for most efficient 'range' lookup

2013-08-24 Thread YN
Hi Michael, thanks for the response. That's an interesting idea... which would work if the results were ordered. I'll have to test that out. I guess the downside would be if the riak server(s) holding the correct result were unavailable for any reason. In that, we could end up g

Re: MapReduce with 2i input filters

2013-08-24 Thread Jeremiah Peschka
There is no way to do this directly. If you need joins (2, 3) or unions (1), the easiest thing that you can do is use Riak Search/Yokozuna to feed your MapReduce query instead of using a 2i input. In response to your specific examples: For #1 you could use an input where index1_bin in range [1,30