Creating and dropping indexes is not permitted in MongoDB Compass Readonly Edition.

Indexes Tab

The Indexes tab lists the existing indexes for a collection.

To access the Indexes tab for a collection, click on the collection on the left hand pane and select the Indexes tab.


For each index, Compass displays the following information:

Name and Definition The name of the index and keys.
Type Regular, text, geospatial or hashed index.
Size How large the index is.
Usage Number of times the index has been used since the time the index was created or the last server restart.
Properties Any special properties (such as uniqueness, partial) of the index.

Create an Index

To create an index on a collection via Compass, the collection must contain documents.


Click the Create Index button.

From the Indexes tab, click the Create Index button to bring up the Create Index dialog.


Optional. Enter the index name.

In the dialog, enter the name of the index to create, or leave blank to have MongoDB create a default name for the index.


Add fields to index.

To specify a key for the index, select the field and the index type To index additional fields, click Add Another Field.


Optional. Specify the index options.

Compass supports the following index options:


Click Create to create the index.

Drop an Index


Click the trash can icon for the index to drop.

From the Indexes tab, to delete an index, click on the trash can icon for that index. A confirmation dialog appears.


Confirm the index to delete.

In the dialog, enter the name of the index to delete.


Click Drop to drop the index.

←   Explain Plans Validation  →