Skip to content

Instantly share code, notes, and snippets.

@stephencweiss
Created November 21, 2018 20:19
Show Gist options
  • Save stephencweiss/04c3a9e1e0902b6c049e5385c684cb17 to your computer and use it in GitHub Desktop.
Save stephencweiss/04c3a9e1e0902b6c049e5385c684cb17 to your computer and use it in GitHub Desktop.
Three common index related commands in the mongo shell
//mongo sh
db.collection.createIndex()
db.collection.getIndexes()
db.collection.dropIndexes(["<index_name>"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment