Created
October 19, 2011 13:11
-
-
Save colwilson/1298241 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# now let's feed all the baskets into the MapReduce | |
# notice that you must convert the mapFunc and | |
# reduceFunc to strings or else they will not work | |
# the 'out' bit is described here http://www.mongodb.org/display/DOCS/MapReduce#MapReduce-Overview | |
Basket.collection.mapReduce mapFunc.toString(), reduceFunc.toString(), { out : "results" }, (err, val) -> | |
if err | |
err # do something with the error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment