Monthly Archives: January 2013

mr = db.runCommand({ “mapreduce” : “user_data”, “map” : function() { for (var key in this) { emit(key, null); } }, “reduce” : function(key, stuff) { return null; }, “out”: “user_data” + “_keys” }) db[mr.result].distinct(“_id”) http://stackoverflow.com/questions/2298870/mongodb-get-names-of-all-keys-in-collection  

Posted on by Xiaomeng (Shawn) Wan | Leave a comment