Docs Menu
Docs Home
/ /
Collections

db.collection.ensureIndex()

db.collection.ensureIndex(keys, options)

Note

Removed in 5.0

db.collection.ensureIndex() has been replaced by db.collection.createIndex().

Tip

Back

db.collection.dropIndexes