Is it possible to run a mapreduce job using mongojs in a node application. I realize that using mapreduce in the web server code is not the most efficient way to do this but it is for testing purposes.
Asked
Active
Viewed 958 times
2
-
I have written a post named [MapReduce in MongoDB](http://thejackalofjavascript.com/mapreduce-in-mongodb/) that shows how to implement Map Reduce using Mongojs. – Arvind Aug 11 '14 at 18:25
1 Answers
3
Yes, have a look at the following function definition in node_modules/mongojs/mongodb/lib/collection.js:
Collection.prototype.mapReduce = function mapReduce (map, reduce, options, callback)

mz2
- 4,672
- 1
- 27
- 47