Created
September 26, 2018 06:42
-
-
Save daimaou92/15b4c06bce638715a2b7b20d6bfbda6a to your computer and use it in GitHub Desktop.
This file contains 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
var mr = db.runCommand({"mapreduce": "collName", "map": function(){ for(var key in this){ emit(key, null); } }, "reduce": function(key, stuff){ return null; }, "out": "collName"+ "_keys" }) | |
db[mr.result].distinct("_id") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment