Docs Home → Launch & Manage MongoDB → MongoDB Atlas
Edit an Atlas Search Index
On this page
You can change the index definition of an existing Atlas Search index. You cannot rename an index; if you need to change an index's name, you must create a new index and delete the old one.
Required Access
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. | ✓ | ✓ | ||
Project Data Access Admin or higher role | To create and manage Atlas Search analyzers and indexes, and
assign the role to your API Key. | ✓ | ✓ | ✓ | ✓ |
Project Owner role | ✓ | ✓ | |||
Organization Owner role | 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. | ✓ | ✓ | ✓ |
Edit an Atlas Search Index Using the Atlas UI
Click Save to apply the changes.
The index's status changes from Active to Building. In this state, you can continue to use the old index because Atlas Search does not delete the old index until the updated index is ready for use. Once the status returns to Active, the modified index is ready to use.
Edit an Atlas Search Index Using the Atlas Search API
To edit an Atlas Search index through the API, send a PATCH
request with
the ID
of the Atlas Search index that you wish to modity to the
fts/indexes/
endpoint. To learn more about the
syntax and parameters for this endpoint, see
Update One.
Edit an Atlas Search Index Using the Atlas CLI
To update a search index for a cluster using the Atlas CLI, run the following command:
atlas clusters search indexes update <indexId> [options]
To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas clusters search indexes update.
Tip
See: Related Links
Edit an Atlas Search Index Programmatically
You can edit an Atlas Search index programmatically by using
mongosh
or a supported MongoDB Driver
in your preferred language.
Note
You must have at least the
atlasAdmin
role or dbAdmin
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.