Docs Menu

Docs HomeLaunch & Manage MongoDBMongoDB Atlas

Delete an Atlas Search Index

On this page

  • Required Access
  • Delete an Atlas Search Index Using the Atlas UI
  • Delete an Atlas Search Index Using the Atlas Search API
  • Delete an Atlas Search Index Using the Atlas CLI
  • Delete an Atlas Search Index Programmatically

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

Role
Action
Atlas UI
Atlas API
Atlas Search API
Atlas CLI
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

Click Database in the top-left corner of Atlas to navigate to the Database Deployments page for your project.

2
3
4

The ellipsis button is located on the right side of the panel. Click the button beside your desired index and select Delete Index.

5

To delete an Atlas Search index through the API, send a DELETE request with the ID of the Atlas Search index that you wish to delete to the fts/indexes/ endpoint. To learn more about the syntax and parameters for this endpoint, see Delete One.

To delete a search index from a cluster using the Atlas CLI, run the following command:

atlas clusters search indexes delete <indexId> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas clusters search indexes delete.

Tip

See: Related Links

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

atlas deployments search indexes delete <indexId> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas deployments search indexes delete.

You can delete an Atlas Search index 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 delete Atlas Search indexes on M0, M2, or M5 Atlas clusters. To create and manage Atlas Search indexes using mongosh or the driver, upgrade to a dedicated cluster tier.

You must have at least the readWriteAnyDatabase role or readWrite 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.


←  Edit an Atlas Search IndexCreate and Run Atlas Search Queries →