MongoDB 搜索索引是一种数据结构,可将 Atlas 集群中的文档映射到从这些文档中提取的术语。MongoDB Search 搜索索引启用使用MongoDB Search 搜索查询对数据库进行高效的全文搜索。
本页介绍如何使用Atlas用户界面或我们支持的客户端之一创建、查看、更新或删除MongoDB搜索索引。
支持的客户端
您可以从Atlas用户界面或以下受支持的客户端之一创建和管理MongoDB搜索索引:
必需的访问权限
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:
项目用户角色MongoDB搜索操作Atlas UIAtlas CLIAtlas API [1]查看MongoDB Search 索引和分析器。
✓
✓
创建、查看、更新和删除MongoDB Search 索引和分析器。
✓
✓
✓
要创建、查看、更新和删除MongoDB搜索索引。
✓
✓
✓
[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.
数据库内置用户角色MongoDB Search 操作说明MongoDB Search 索引特权操作查看MongoDB Search 索引和分析器。
创建、查看、更新和删除MongoDB Search 索引和分析器。
了解详情
要学习如何定义MongoDB搜索索引以满足您的MongoDB搜索查询需求,请参阅定义您的查询。
要学习如何创建MongoDB搜索索引,请参阅创建MongoDB搜索索引。
要学习;了解有关本教程中描述的MongoDB Search索引配置的更多信息,请参阅以下参考页面:
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.
要了解如何定义索引以满足您的查询偏好,请参阅定义您的索引。
To retrieve MongoDB Search index size and other search metrics programmatically using the Atlas Administration API, see Retrieve MongoDB Search Metrics Programmatically.
通过观看学习
您还可以观看以下视频,学习;了解有关MongoDB Search 索引的更多信息: