2

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.

Alberto De Caro
  • 5,147
  • 9
  • 47
  • 73
benhoman
  • 21
  • 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 Answers1

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