I was testing the pymongo error messages for reaching my storage quota, and this resulted in me creating a 177.96MB index for a 4.03MB collection (after deleting the dummy logs used to fill my quota). I’m trying to delete the excess index, but I’m repeatedly receiving this error.
OperationFailure: CMD_NOT_ALLOWED: reIndex, full error: {'ok': 0, 'errmsg': 'CMD_NOT_ALLOWED: reIndex', 'code': 8000, 'codeName': 'AtlasError'}
The MongoDB Role I’m using to access the cluster is atlasAdmin. So, I’m not sure why I wouldn’t have access to this command. I’m getting the error when running the following lines.
client.database_name.collection_name.drop_indexes()
client.database_name.command({'reIndex': 'collection_name'})
Does anyone know why I would be unable to do this?