Mongoengine: No function to update the index.

Created on 27 Oct 2020  路  2Comments  路  Source: MongoEngine/mongoengine

I want to update my index but there are no functions like delete_index in mongoengine to delete an index by its name.

Most helpful comment

User._get_collection().dropIndex(index_name)

All 2 comments

User._get_collection().dropIndex(index_name)

Yes this method worked but we have to use drop_index which is provided in the pymongo layer of mongoengine.

Was this page helpful?
0 / 5 - 0 ratings