mongodb index list code example
Example 1: mongodb index
db.collection.createIndex( { name: -1 } )
Example 2: mongodb list index
db.collection.getIndexes()
db.collection.createIndex( { name: -1 } )
db.collection.getIndexes()