MapReduce - sorting via the Java client

Oved Machlev omachlev at interwise.com
Wed Aug 29 07:39:06 EDT 2012


Hi,

How can I use the sorting functions over 'real' fields in the stored objects? How can I set the field on which I want to sort by?

It seems that the following refers to the key, in my case it's a UUID, and therefore useless to sort by:

                MapReduceResult result = riakClient.
                                mapReduce("some_bucket").
                                addMapPhase(new NamedJSFunction("Riak.mapValuesJson"), false).
                                addReducePhase(new NamedErlangFunction("riak_kv_mapreduce", "reduce_sort"), true).
                                execute();


thanks,
Oved.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20120829/29181163/attachment.html>


More information about the riak-users mailing list