Skip to main content
Glama

octodet-elasticsearch-mcp

update_by_query

Modify documents in an Elasticsearch index by executing a script on entries matching a specific query, with options to handle conflicts, limit updates, and refresh the index.

Instructions

Update documents in an Elasticsearch index based on a query

Input Schema

NameRequiredDescriptionDefault
conflictsNoWhat to do when version conflicts occur during the update
indexYesName of the Elasticsearch index to update documents in
maxDocsNoLimit the number of documents to update
queryYesElasticsearch query to select documents for updating
refreshNoShould the index be refreshed after the update (defaults to true)
scriptYesScript to execute on matching documents

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "conflicts": { "description": "What to do when version conflicts occur during the update", "enum": [ "abort", "proceed" ], "type": "string" }, "index": { "description": "Name of the Elasticsearch index to update documents in", "minLength": 1, "type": "string" }, "maxDocs": { "description": "Limit the number of documents to update", "exclusiveMinimum": 0, "type": "integer" }, "query": { "additionalProperties": {}, "description": "Elasticsearch query to select documents for updating", "type": "object" }, "refresh": { "default": true, "description": "Should the index be refreshed after the update (defaults to true)", "type": "boolean" }, "script": { "additionalProperties": false, "description": "Script to execute on matching documents", "properties": { "params": { "additionalProperties": {}, "description": "Optional parameters for the script", "type": "object" }, "source": { "description": "Painless script source for the update operation", "minLength": 1, "type": "string" } }, "required": [ "source" ], "type": "object" } }, "required": [ "index", "query", "script" ], "type": "object" }
Install Server

Other Tools from octodet-elasticsearch-mcp

Related Tools

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Octodet/elasticsearch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server