Reindex into another index
reindexCopy documents between indices with optional query filtering and script transformations. Asynchronous operation returns a task id to track completion.
Instructions
Copy documents between indices. Asynchronous: returns a task id at once and the copy is still running on return — poll it with GET _tasks/.
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": {
"sourceIndex": "<sourceIndex>",
"destIndex": "<destIndex>"
},
"name": "reindex"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Query DSL selecting which documents to copy. Omit to copy all. | |
| script | No | Transform each document while copying | |
| destIndex | Yes | Destination index, created if absent | |
| sourceIndex | Yes | Source index |