News for hackers. Stuff that matters.
Re:MapReduce from the basics to the actually useful (in unde... by banjiewen on Friday January 14, 2011 @01:07AM (#2102739)
There are reduce views there - both examples 2 and 3 use the built-in "_sum" reduce, which is equivalent to something like:

    function(key, values, rereduce) { return sum(values); }
With regard to more advanced views: you'd be surprised how far you can get with the built-ins (_sum, _count, _stats); I've built a non-trivial data backend (on Cloudant, natch,) using pretty much entirely _sum reduces. Abusing the reduce with complex calculations doesn't seem to be worth it from either a disk space or query performance standpoint.

There are no comments on this comment yet.