- Reference >
- JavaScript Methods >
- db.collection.createIndex()
db.collection.createIndex()¶
-
db.collection.
createIndex
(keys, options)¶ Parameters: The
ensureIndex()
method is the preferred way to create indexes on collections.
db.collection.
createIndex
(keys, options)¶Parameters: |
---|
The ensureIndex()
method is the preferred
way to create indexes on collections.