This version of the documentation is archived and no longer supported. To learn how to upgrade your version of MongoDB Ops Manager, refer to the upgrade documentation.
You were redirected from a different version of the documentation. Click here to go back.
This version of the manual is no longer supported.

Manage Indexes in Data Explorer

You can use the Data Explorer to manage indexes on your collections.

To access the Data Explorer:

  1. Click Deployment in the left navigation.
  2. Select the desired MongoDB deployment.
  3. Select the Data Explorer tab.

Required Roles

To create or drop indexes, you must have access provided by at least one of the following roles:

View Indexes

From the Collections tab, you can view index information for a collection. To view index information for a collection:


Select the database for the collection.

The main panel and Namespaces on the left side list the collections in the database.

Screenshot highlighting databases in Data Explorer.

Select the collection on the left-hand side or in the main panel.

The main panel displays the Find, Indexes, and Aggregation views.


Select the Indexes view.

The indexes table lists the indexes and associated index information for the collection. Index information includes the index definition, the size, and the usage frequency.

Screenshot highlighting index view in Data Explorer.

Create an Index

To create an index for a collection through the Data Explorer:


Go to the Indexes tab.

  1. Click the collection you wish to index.
  2. Click the Indexes tab under the collection name.

Click + Create Index.

In the Create Index modal, enter the index key specification document in the Fields box:

{ <field1>: <index type>, ... }


To create a compound index on the fields category (ascending order) and score (descending order), specify the index specification document:

{ category: 1, score: -1 }

For more information on indexes, see Indexes.


(Optional) Specify the index options.

{ <option1>: <value1>, ... }


To set the unique option and the name for the new index, enter this document:

{ unique: true, name: "myUniqueIndex" }

(Optional) Set the Collation options.

Locale is the ICU Locale code for local languages. To review the list of locales MongoDB collation supports, see the list of languages and locales.

  • To learn more about the specific collation options, see Collation in the MongoDB manual.
  • To learn which collation options are enabled by default for each locale, see Collation Locales and Default Values in the MongoDB Manual.

(Optional) Build indexes with rolling builds.

Select Build index via rolling process.


Do not set the background construction option if you select this option. Background construction negates the performance benefit gained by building an index with a rolling build.

Building indexes with rolling builds reduces the performance impact of building indexes on replica sets and sharded clusters. Ops Manager maintains the availability of the cluster by taking one node out of the cluster at a time, starting with a secondary, building its index, and adding it back to the cluster.

After you build an index in a rolling fashion, if your MongoDB database runs with an FCV less than 4.2, resync the head database to ensure that the head database takes the new index into account.

To learn more about building indexes with rolling builds, see Build Indexes on Replica Sets.

Index Options Incompatible with Rolling Index Builds

You cannot use the following options when creating an index that you want to build in a rolling manner:

Ops Manager ignores these options if you specify them in the Options pane.


Click Create.

To learn how to create indexes, see the MongoDB Manual.


Confirm or reject your index.

The Confirm Operation modal appears.

  • If your index creation looks correct, click Confirm. This closes the modal and create the index.
  • If your index creation looks incorrect, click Cancel. This closes the modal without creating the index.

Drop an Index

To drop an index from a collection through the Data Explorer:


Go to the Indexes tab.

Select the collection whose index you wish to drop, and go to the Indexes tab.


Click the Drop Index button for the index to drop.


Confirm action.

Confirm by typing the name of the index, and click Drop.


You cannot delete the _id index.