mongosh
mongo
db.collection.ensureIndex(keys, options)
db.collection.ensureIndex() has been replaced by db.collection.createIndex().
db.collection.ensureIndex()
db.collection.createIndex()
Back
db.collection.dropIndexes()
Next
db.collection.estimatedDocumentCount()