In Mongo, how do I display the indexes of a collection?

24,582

If you want raw access to the indexes, you can query the db.system.indexes collection:

> db.system.indexes.find()

To find the indexes for a specific collection, you can do:

> db.collection.getIndexes()

See this question.

Share:
24,582

Related videos on Youtube

TIMEX
Author by

TIMEX

Updated on August 03, 2020

Comments

  • TIMEX
    TIMEX over 3 years

    I just want to display all the indexes in the shell.