MQL reference navigation
dropIndexes
Removes indexes from a collection.
db.flights.dropIndex("route_no_1")First create route_no_1 using the airline example in createIndexes.
| Parameter | Description |
|---|---|
dropIndexes | (Required) A string specifying the collection name. |
index | (Required) A string, document, or array of strings specifying the index name, key pattern, or list of names. "*" drops eligible non-_id indexes. |
comment | (Optional) A string carrying trace context for gateway request tracing; see common request fields. |
The _id index cannot be dropped.