1,746
社区成员
发帖
与我相关
我的任务
分享
33. // Write map and reduce function
34. string mapFunction = @"function(){
35. emit(this.cusid, this.price);
36. };";
37.
38. string reduceFunction = @"function(cusid, prices){
39. var total = 0;
40. total = Array.sum(prices);
41. return { sum: total };
42. };";
具体可参见我的博客里面的一篇文章,希望对你有用,http://blog.csdn.net/zxz414644665/article/details/9986183