Dropping an index is as simple as creating it. We can reference the index by its name or by the fields it is composed from:
> db.books.dropIndex( { price: -1 } )
> db.books.dropIndex( "price_index" )
Dropping an index is as simple as creating it. We can reference the index by its name or by the fields it is composed from:
> db.books.dropIndex( { price: -1 } )
> db.books.dropIndex( "price_index" )