drop indexes in mongodb code example
Example: drop all indexes mongodb
db.getCollectionNames().forEach(function(collName) {
db.runCommand({dropIndexes: collName, index: "*"});
});
db.getCollectionNames().forEach(function(collName) {
db.runCommand({dropIndexes: collName, index: "*"});
});