doc_index
Index documents into Easysearch with customizable parameters like ID assignment, refresh strategy, and routing for organized data storage.
Instructions
写入文档
参数:
index: 索引名称
document: 文档内容
id: 文档 ID(可选,不传则自动生成)
refresh: 刷新策略 true/false/wait_for
routing: 路由值
示例:
doc_index("products", {"name": "iPhone", "price": 999})
doc_index("products", {"name": "iPad", "price": 799}, id="ipad-001")
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"index": "<index>",
"document": "<document>"
},
"name": "doc_index"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| document | Yes | ||
| id | No | ||
| refresh | No | ||
| routing | No |