Hello,

If you look at the predefined js function in Riak in mapred_builtins.js you
could see a reduce method :

Riak.reduceSlice taking an array of 2 parameter as argument :

here is the source code extracted from the file :

[...]
reduceSlice: function(value, arg) {
      var start = arg[0];
      var end = arg[1];
      if (end > value.length) {
        return value;
      }
      else {
        return value.slice(start, end);
      }
    }
[...]

so you could use :
[...]
"reduce": {
                "language": "javascript",
                "name": "Riak.reduceSlice",
                "arg":[10:110]
            }
[...]


Best regards,

-- 
Damien
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to