Docs Menu

Docs HomeLaunch & Manage MongoDBMongoDB Atlas

View an Atlas Search Index

On this page

  • Required Access
  • View an Atlas Search Index in the Atlas UI
  • Retrieve Atlas Search Indexes Using the Atlas Search API
  • Retrieve Atlas Search Indexes Using the Atlas CLI
  • Retrieve Atlas Search Indexes Programmatically

Important

If you use the $out aggregation stage to modify a collection with an Atlas Search index, you must delete and re-create the search index. If possible, consider using $merge instead of $out.

You can view an Atlas Search index definition in the Index Overview page. For each index, the Index Overview page shows the following:

  • Namespace for the index.

  • Index and search analyzers specified in the index definition.

  • Dynamic or static mapping.

  • Field mappings in the index definition, if any, including field name, data type, and whether dynamic mapping is enabled for the individual field.

This page describes how to view your index definition in the Index Overview page. You can also Edit an Atlas Search Index with the visual or JSON editor in the Index Overview page.

The following table shows the modes of access each role supports.

Role
Action
Atlas UI
Atlas API
Atlas Search API
Atlas CLI
Project Data Access Read Only or higher role
To view Atlas Search analyzers and indexes.
To create and manage Atlas Search analyzers and indexes, and assign the role to your API Key.
To create access list entries for your API Key and send the request from a client that appears in the access list for your API Key.
To create, view, edit, and delete Atlas Search indexes using the Atlas UI or API.
1
2
3
4

To retrieve an Atlas Search index through the API, send a GET request with the ID of the Atlas Search index that you wish to retrieve to the fts/indexes/ endpoint. To learn more about the syntax and parameters for this endpoint, see Get All. To retrieve all Atlas Search indexes for a collection, send a GET request to the fts/indexes/ endpoint with the namespace of the collection whose indexes you want to retrieve.

To list all search indexes for a cluster using the Atlas CLI, run the following command:

atlas clusters search indexes list [options]

To return the details for the search index you specify using the Atlas CLI, run the following command:

atlas clusters search indexes describe <indexId> [options]

To learn more about the syntax and parameters for the previous commands, see the Atlas CLI documentation for atlas clusters search indexes list and atlas clusters search indexes describe.

Tip

See: Related Links

To describe the specified search index for the specified deployment using the Atlas CLI, run the following command:

atlas deployments search indexes describe [indexId] [options]

To list all search indexes for the specified deployment using the Atlas CLI, run the following command:

atlas deployments search indexes list [options]

To learn more about the syntax and parameters for the previous commands, see the Atlas CLI documentation for atlas deployments search indexes describe and atlas deployments search indexes list.

You can retrieve your Atlas Search indexes programmatically by using mongosh or a supported MongoDB Driver in your preferred language.

Note

You can't use the mongosh command or driver helper methods to retrieve Atlas Search indexes on M0, M2, or M5 Atlas clusters. To create and retrieve Atlas Search indexes using mongosh or the driver, upgrade to a dedicated cluster tier.

You must have at least the readAnyDatabase role or read access to the database that contains the indexes. To learn more, see Built-in Roles or Specific Privileges.


Use the Select your language drop-down menu to set the language of the example in this section.


←  Resume or Delete an Atlas Search Index DraftEdit an Atlas Search Index →