There are a few more options than this: http://docs.mongodb.org/manual/reference/command/mapReduce/