collection.createIndex
Creates an index on the db and collection (will not create if already exists)
Arguments
fieldOrSpec
(String|Array|Object): Defines the index.[
options
] (object)[
callback
] (function)
Returns
A promise
Example
users.createIndex('name.first')
users.createIndex('name last')
users.createIndex(['nombre', 'apellido'])
users.createIndex({ up: 1, down: -1 })
users.createIndex({ woot: 1 }, { unique: true })