如何使用api创建couchbase全文搜索索引别名

如何使用api创建couchbase全文搜索索引别名,couchbase,Couchbase,当使用管理界面创建全文搜索索引时,我可以使用 “Show curl command to modify this index definition”选项以获取curl命令 像这个: curl -XPUT -H "Content-Type: application/json" \ -u Administrator:password http://localhost:8094/api/index/idx_order_customer -d \ '{definition body}' 是否有一种方

当使用管理界面创建全文搜索索引时,我可以使用 “Show curl command to modify this index definition”选项以获取curl命令

像这个:

curl -XPUT -H "Content-Type: application/json" \ -u Administrator:password
http://localhost:8094/api/index/idx_order_customer -d \
'{definition body}'
是否有一种方法可以同时使用curl选项创建索引别名


谢谢

是的,这是可能的。这是一个放在同一个端点。例如:

PUT/api/index/{indexName}

使用与您的示例类似的JSON主体。事实上,当您创建新索引时,Couchbase服务器UI中将显示一个带有JSON主体的“索引定义预览”


有关更多信息,请查看文档:

谢谢,我没有注意这一部分