db.collection.ensureIndex()

db.collection.ensureIndex(keys, options)
Note注意
Removed in 5.0在5.0中删除
Tip提示
See also: 参阅:
←  db.collection.dropIndexes()db.collection.estimatedDocumentCount() →