Hi!
I’m new to MongoDB and I had some problems with dropIndexes method in some collections I’m working with.
Seems like the documentation is misleading, or maybe a version problem with the mongoDB I’m using. I just wanted to point out - I don’t know if this is the best place for it, but let’s go:
In this page, they say the correct syntax is:
db.<collection>.dropIndexes("<index1>", "<index2>", "<index3>")
But this one is slighter different, an array:
db.collection.dropIndexes( [ "a_1_b_1", "a_1", "a_1__id_-1" ] )
Only the second one worked for me.