Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs 菜单
Docs 主页
/ /
Atlas CLI
/ /

Atlas Search 搜索索引配置文件

您可以使用Atlas Search 索引配置文件来指定创建Atlas Search 索引或使用 更新Atlas Search Atlas CLI索引时所需的设置。Atlas CLI接受 .json Atlas Search索引配置文件。

使用配置文件创建 Atlas Search 索引时,您可以指定创建一个 Atlas Search 索引Request Body Schema中列出的任何设置。

使用配置文件更新 Atlas Search 索引时,可以指定Request Body Schema下的更新一个 Atlas Search 索引中列出的任何设置。

请按照以下步骤使用配置文件创建 Atlas Search 索引:

1
  1. 导航到 Atlas Admin API 规范的创建一个 Atlas Search 索引部分。

  2. 在右侧的Request samples下,单击Expand all

  3. 单击Copy ,复制样本请求。

2
  1. 将示例请求粘贴到文本编辑器中,并更改值以反映所需的配置。

  2. 使用.json扩展名保存文件。

3

运行带有 --file 选项的 Atlas clusters 搜索 indexes create命令。

使用--file标志指定保存的文件的路径。

请按照以下步骤使用配置文件更新 Atlas Search 索引:

1
  1. 导航到 Atlas Admin API 规范的Update One Atlas Search Index (更新一个 Atlas 搜索索引)部分。

  2. 在右侧的Request samples下,单击Expand all

  3. 单击Copy ,复制样本请求。

2
  1. 将示例请求粘贴到文本编辑器中,并更改值以反映所需的配置。

  2. 使用.json扩展名保存文件。

3

使用 --file 选项运行Atlas 搜索 searchindexes 更新命令。

使用--file标志指定保存的文件的路径。

后退

Atlas Data Federation

在此页面上