Create, View, Drop, and Hide Indexes
You can use the Atlas CLI or the Atlas UI to manage indexes on your collections.
Indexes support the efficient execution of queries in MongoDB and should be considered for fields which your application reads often. To learn more about creating effective indexes, see Indexing Strategies.
Required Roles
To create, drop, or hide indexes, you must have access provided by at least one of the following roles:
Considerations
By default, you can have up to three concurrent index builds. To learn more, see Maximum Concurrent Index Builds.
View Indexes
From the Collections tab, you can view index information for a collection. To view index information for a collection:
Create an Index
Tip
When you create indexes, keep the ratio of reads to writes on the target collection in mind. Indexes come with a performance cost, but are more than worth the cost for frequent queries on large data sets. Before you create an index, review the documented indexing strategies.
Note
You can build full-text search with Atlas Search. Atlas Search offers fine-grained text indexing. To learn more, see Review Atlas Search Index Syntax.
Drop an Index
To drop an index from a collection by using the Atlas UI:
Important
You can't delete or hide the _id
index. To learn more, see
Unique Indexes.
Consider hiding the index to evaluate the impact of dropping an index before you drop it. To learn more, see Hidden Indexes.
Note
Atlas CLI Limitation
You can't drop a cluster's index by using the Atlas CLI.
Hide an Index
To hide an index by using the Atlas UI: