Last active
November 21, 2018 19:58
-
-
Save stephencweiss/aab22217b5698f7cba0086adb9c98b2d to your computer and use it in GitHub Desktop.
Mongo dropIndex() example with and without index name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// mongo sh | |
> db.descriptions.dropIndex("product_id_1") | |
{ "nIndexesWas" : 2, "ok" : 1 } | |
> db.descriptions.dropIndexes() | |
{ | |
"nIndexesWas" : 2, | |
"msg" : "non-_id indexes dropped for collection", | |
"ok" : 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment