mongodb list indexes on collection code example Example: mongodb list index db.collection.getIndexes()