collection.dropIndex

Mongo documentation

Drops indexes from this collection.

Arguments

  1. fields (String|Object|Array): Defines the index (or indexes) to drop.

  2. [options] (object)

  3. [callback] (function)

Returns

A promise

Example

users.dropIndex('name.first')
users.dropIndex('name last')
users.dropIndex(['nombre', 'apellido'])
users.dropIndex({ up: 1, down: -1 })

results matching ""

    No results matching ""