Created
November 18, 2013 11:49
-
-
Save oisin/7526544 to your computer and use it in GitHub Desktop.
Grab all the indexes from a Mongo instance
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
$ mongo host:port/db | |
MongoDB shell version: 2.2.3 | |
connecting to: host:port/db | |
> db.auth('myuserid','mypassword') | |
1 | |
> db.system.indexes.find() | |
{ "v" : 1, "key" : { "_id" : 1 }, "ns" : "db.system.users", "name" : "_id_" } | |
{ "v" : 1, "key" : { "_id" : 1 }, "ns" : "db.administrators", "name" : "_id_" } | |
{ "v" : 1, "key" : { "_id" : 1 }, "ns" : db.apps", "name" : "_id_" } | |
{ "v" : 1, "key" : { "app_id" : 1 }, "unique" : true, "ns" : "db.apps", "name" : "app_id_1" } | |
{ "v" : 1, "key" : { "customer_id" : 1 }, "ns" : "db.apps", "name" : "customer_id_1" } | |
{ "v" : 1, "key" : { "_id" : 1 }, "ns" : "db.audiences", "name" : "_id_" } | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment