Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (50.2k points)

In my Mongo shell, I want to display all the indexes that are there inside the collection. How can I display it?

1 Answer

0 votes
by (107k points)
edited by

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. 

Related questions

0 votes
1 answer
0 votes
2 answers
0 votes
2 answers
0 votes
1 answer
asked Feb 5, 2020 in Web Technology by ashely (50.2k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...