Hi.

I have a function that performs a numeric sort (ascending) as
described at http://siculars.posterous.com/using-riaks-mapreduce-for-sorting.
But how to perform an alphanumeric sort?

I'm using the code found in the link above:

var reduceSort = function (v, args) {
  return v.sort (function(a, b) { return a['key'] - b['key'] });
};

I'm writing a small app using express, riakjs and riak to keep track
of crosscountry-races for kids, and would like to sort by name like:

var reduceSort = function (v, args) {
  return v.sort (function(a, b) { return a['fname'] - b['fname'] });
};

Hopefully I'm not asking dumb questions. :-)

-- 
regards
Claus

When lenity and cruelty play for a kingdom,
the gentler gamester is the soonest winner.

Shakespeare

twitter.com/kometen

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

Reply via email to