A MongoDB Search index is a data structure that maps documents from your Atlas cluster to the terms that are extracted from those documents. MongoDB Search indexes enable efficient full-text searches of your database with MongoDB Search queries.
This page describes how to create, view, update, or delete MongoDB Search indexes using the Atlas UI or one of our supported clients.
Supported Clients
You can create and manage MongoDB Search indexes from the Atlas UI or one of the following supported clients:
Atlas CLI, with Atlas cluster running MongoDB 7.0+
mongosh, with Atlas cluster running MongoDB 7.0+.Compass, with Atlas cluster running MongoDB 7.0+.
Supported MongoDB Drivers:
Required Access
You can assign Project User Roles or Database Built-in User Roles to provide access to the user privileges necessary to perform the MongoDB Search index actions described in this guide:
The following table shows the modes of access that the following Project User Roles support for the specified MongoDB Search actions:
Project User RoleMongoDB Search ActionAtlas UIAtlas CLIAtlas API [1]Project Data Access Read Onlyor higherTo view MongoDB Search indexes and analyzers.
✓
✓
Project Data Access Adminor higherTo create, view, update, and delete MongoDB Search indexes and analyzers.
✓
✓
✓
To create, view, update, and delete MongoDB Search indexes.
✓
✓
✓
[1] Each role grants permission to call either a subset or the full set of MongoDB Search API endpoints in the Atlas Administration API. See the MongoDB Search Action column for descriptions of the API endpoints that each role grants access to. The following table shows the Database Built-in User Roles that support the specified MongoDB Search Index Privilege Actions.
Database Built-in User RolesMongoDB Search Action DescriptionMongoDB Search Index Privilege ActionTo view MongoDB Search indexes and analyzers.
To create, view, update, and delete MongoDB Search indexes and analyzers.
To learn more, see Roles and Privileges Overview or Built-in Roles and Inherited Privileges.
Learn More
To learn how to define a MongoDB Search index to meet your MongoDB Search query needs, see Define Your Query.
To learn how to create a MongoDB Search index, see Create a MongoDB Search index.
To learn more about the MongoDB Search index configurations described in this tutorial, see the following reference pages:
For hands-on experience creating MongoDB Search indexes for the sample datasets and running MongoDB Search queries against the indexed data, try the MongoDB Search Quick Start.
For a conceptual overview of how to define an index to meet your query preferences, see Define Your Index.
Learn by Watching
You can also watch the following videos to learn more about MongoDB Search indexes: