delete_by_query
Deletes documents from a specified index that match a provided query, enabling targeted removal of unwanted or outdated records in Elasticsearch/OpenSearch.
Instructions
Deletes documents matching the provided query.
Args:
index: Name of the index
body: Query to match documents for deletion
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>",
"body": "<body>"
},
"name": "delete_by_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| index | Yes |