如何使用 api 创建 couchbase 全文搜索索引别名
How to create couchbase full text search index alias using the api
在使用管理界面创建全文搜索索引时,我可以使用
"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。示例:
PUT /api/index/{indexName}
具有与您的示例相似的 JSON 正文。事实上,当您创建新索引时,"Index Definition Preview" 会在 Couchbase 服务器 UI 中显示 JSON 正文。
有关详细信息,请查看文档:Couchbase REST API Documentation - FTS indexes
在使用管理界面创建全文搜索索引时,我可以使用 "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。示例:
PUT /api/index/{indexName}
具有与您的示例相似的 JSON 正文。事实上,当您创建新索引时,"Index Definition Preview" 会在 Couchbase 服务器 UI 中显示 JSON 正文。
有关详细信息,请查看文档:Couchbase REST API Documentation - FTS indexes