Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hirenrojasara/9cede8ff21197d614005 to your computer and use it in GitHub Desktop.
Save hirenrojasara/9cede8ff21197d614005 to your computer and use it in GitHub Desktop.
Drop index from mongoose model programatically
// If you are having multiple mongoose connection, please iterate it and get the reference.
mongoose.connections[0].collections("collectionname").dropIndex("propertyName",callback)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment