Hello!

I'm trying to sort objects in riak by secondary index. Is it possible?

I've read some sources and understood, that standard map-reduce function
for key-sort (reduce_sort in riak_kv_mapreduce.erl)  orders list in memory.
Such approach can be applied to ids, but not the best way for sorting data.

In classic map-reduce model we work with key-value pairs, whitch are
grouped and ordered by key after map step on each map node, so on the
reduce step we have an ordered set of keys with value-sets. In the Riak map
phase returns a plain array of values and the reduce phase works with
concatenated array, produced by all mappers. So we can apply sort only on
reduce phase on large data.

Is there any fast and distributed way to sort data by fields not on reduce
step and not after select?

Thanks!
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to