Methods
createIndex()
The createIndex() method is used to interact with collections in MongoDB.
createIndex()
The createIndex() method is used to interact with collections in MongoDB.
Syntax
db.collection.createIndex(...)
Example
db.users.createIndex(...)