The wiki page on dropIndex only mentions the syntax using a document for the index, as in
db.coll.dropIndex({x:1})
but an index can also be dropped by its name:
db.coll.dropIndex('x_1')
There is also a related bug SERVER-1887: If a custom name was specified during index creation, only the name syntax works and not the document syntax (except when using runCommand(
) directly). Maybe should be mentioned in a red warning box until the bugfix is released. See CS-4711 for more details about this issue.
The docs page on dropIndex is minimal and doesn't provide any examples.
- is related to
-
SERVER-1887 dropIndex not working if a name was specified during the ensureIndex
- Closed