Back
In my Mongo shell, I want to display all the indexes that are there inside the collection. How can I display it?
In MongoDB, there is a syntax to access to the indexes, refer to the following syntax:
> db.system.indexes.find()
And to find the indexes for a particular collection, you can write the following code:
> db.collection.getIndexes()
To help you gain a better understanding, here is a Full Stack Developer Certification Course provided by Intellipaat.
31k questions
32.8k answers
501 comments
693 users