Skip to content

Instantly share code, notes, and snippets.

@stephencweiss
Created November 21, 2018 19:55
Show Gist options
  • Save stephencweiss/3f4095da701b0f8191e9c006b74f289f to your computer and use it in GitHub Desktop.
Save stephencweiss/3f4095da701b0f8191e9c006b74f289f to your computer and use it in GitHub Desktop.
Mongo getIndexes() example - DB = trailblazer; Collection = descriptions
// mongo sh
> db.descriptions.getIndexes()
[
{
"v" : 2,
"key" : {
"_id" : 1
},
"name" : "_id_",
"ns" : "trailblazer.descriptions"
},
{
"v" : 2,
"key" : {
"product_id" : 1
},
"name" : "product_id_1",
"ns" : "trailblazer.descriptions"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment