Use Elasticsearch to search with Query DSL, manage documents and indexes, run bulk operations, and inspect cluster health. The block supports self-hosted and Elastic Cloud deployments.
Search with Query DSL, manage documents and indexes, run bulk operations, and inspect cluster health on a self-hosted or Elastic Cloud deployment.
Search documents in Elasticsearch using Query DSL. Returns matching documents with scores and metadata.
Inputs and outputsParameter Type Required Description deploymentTypestring Yes Deployment type: self_hosted or cloud hoststring No Elasticsearch host URL (for self-hosted) cloudIdstring No Elastic Cloud ID (for cloud deployments) authMethodstring Yes Authentication method: api_key or basic_auth apiKeystring No Elasticsearch API key usernamestring No Username for basic auth passwordstring No Password for basic auth indexstring Yes Index name to search (e.g., "products", "logs-2024") querystring No Query DSL as JSON string. Example: {"match":{"title":"search term"}} or {"bool":{"must":[...]}} fromnumber No Starting offset for pagination (e.g., 0, 10, 20). Default: 0 sizenumber No Number of results to return (e.g., 10, 25, 100). Default: 10 sortstring No Sort specification as JSON string. Example: [{"created_at":"desc"}] or [{"_score":"desc"},{"name":"asc"}] sourceIncludesstring No Comma-separated list of fields to include in _source sourceExcludesstring No Comma-separated list of fields to exclude from _source trackTotalHitsboolean No Track accurate total hit count (default: true)
Parameter Type Description tooknumber Time in milliseconds the search took timed_outboolean Whether the search timed out hitsobject Search results with total count and matching documents aggregationsjson Aggregation results if any
Index (create or update) a document in Elasticsearch.
Inputs and outputsParameter Type Required Description deploymentTypestring Yes Deployment type: self_hosted or cloud hoststring No Elasticsearch host URL (for self-hosted) cloudIdstring No Elastic Cloud ID (for cloud deployments) authMethodstring Yes Authentication method: api_key or basic_auth apiKeystring No Elasticsearch API key usernamestring No Username for basic auth passwordstring No Password for basic auth indexstring Yes Target index name (e.g., "products", "logs-2024") documentIdstring No Document ID (e.g., "abc123", "user_456"). Auto-generated if not provided documentstring Yes Document body as JSON string refreshstring No Refresh policy: true, false, or wait_for
Parameter Type Description _indexstring Index where the document was stored _idstring Document ID _versionnumber Document version resultstring Operation result (created or updated)
Retrieve a document by ID from Elasticsearch.
Inputs and outputsParameter Type Required Description deploymentTypestring Yes Deployment type: self_hosted or cloud hoststring No Elasticsearch host URL (for self-hosted) cloudIdstring No Elastic Cloud ID (for cloud deployments) authMethodstring Yes Authentication method: api_key or basic_auth apiKeystring No Elasticsearch API key usernamestring No Username for basic auth passwordstring No Password for basic auth indexstring Yes Index name (e.g., "products", "logs-2024") documentIdstring Yes Document ID to retrieve (e.g., "abc123", "user_456") sourceIncludesstring No Comma-separated list of fields to include sourceExcludesstring No Comma-separated list of fields to exclude
Parameter Type Description _indexstring Index name _idstring Document ID _versionnumber Document version foundboolean Whether the document was found _sourcejson Document content
Partially update a document in Elasticsearch using doc merge.
Inputs and outputsParameter Type Required Description deploymentTypestring Yes Deployment type: self_hosted or cloud hoststring No Elasticsearch host URL (for self-hosted) cloudIdstring No Elastic Cloud ID (for cloud deployments) authMethodstring Yes Authentication method: api_key or basic_auth apiKeystring No Elasticsearch API key usernamestring No Username for basic auth passwordstring No Password for basic auth indexstring Yes Index name (e.g., "products", "logs-2024") documentIdstring Yes Document ID to update (e.g., "abc123", "user_456") documentstring Yes Partial document to merge as JSON string retryOnConflictnumber No Number of retries on version conflict
Parameter Type Description _indexstring Index name _idstring Document ID _versionnumber New document version resultstring Operation result (updated or noop)
Delete a document from Elasticsearch by ID.
Inputs and outputsParameter Type Required Description deploymentTypestring Yes Deployment type: self_hosted or cloud hoststring No Elasticsearch host URL (for self-hosted) cloudIdstring No Elastic Cloud ID (for cloud deployments) authMethodstring Yes Authentication method: api_key or basic_auth apiKeystring No Elasticsearch API key usernamestring No Username for basic auth passwordstring No Password for basic auth indexstring Yes Index name (e.g., "products", "logs-2024") documentIdstring Yes Document ID to delete (e.g., "abc123", "user_456") refreshstring No Refresh policy: true, false, or wait_for
Parameter Type Description _indexstring Index name _idstring Document ID _versionnumber Document version resultstring Operation result (deleted or not_found)
Perform multiple index, create, delete, or update operations in a single request for high performance.
Inputs and outputsParameter Type Required Description deploymentTypestring Yes Deployment type: self_hosted or cloud hoststring No Elasticsearch host URL (for self-hosted) cloudIdstring No Elastic Cloud ID (for cloud deployments) authMethodstring Yes Authentication method: api_key or basic_auth apiKeystring No Elasticsearch API key usernamestring No Username for basic auth passwordstring No Password for basic auth indexstring No Default index for operations (e.g., "products", "logs-2024") operationsstring Yes Bulk operations as NDJSON string. Index, create, and update use an action line followed by a document/update line; delete uses only an action line. Example: {"index":{"_index":"products","_id":"1"}}\n{"name":"Widget"}\n refreshstring No Refresh policy: true, false, or wait_for
Parameter Type Description tooknumber Time in milliseconds the bulk operation took errorsboolean Whether any operation had an error itemsarray Results for each operation
Count documents matching a query in Elasticsearch.
Inputs and outputsParameter Type Required Description deploymentTypestring Yes Deployment type: self_hosted or cloud hoststring No Elasticsearch host URL (for self-hosted) cloudIdstring No Elastic Cloud ID (for cloud deployments) authMethodstring Yes Authentication method: api_key or basic_auth apiKeystring No Elasticsearch API key usernamestring No Username for basic auth passwordstring No Password for basic auth indexstring Yes Index name to count documents in (e.g., "products", "logs-2024") querystring No Query DSL to filter documents (JSON string). Example: {"match":{"status":"active"}}
Parameter Type Description countnumber Number of documents matching the query _shardsobject Shard statistics
Create a new index with optional settings and mappings.
Inputs and outputsParameter Type Required Description deploymentTypestring Yes Deployment type: self_hosted or cloud hoststring No Elasticsearch host URL (for self-hosted) cloudIdstring No Elastic Cloud ID (for cloud deployments) authMethodstring Yes Authentication method: api_key or basic_auth apiKeystring No Elasticsearch API key usernamestring No Username for basic auth passwordstring No Password for basic auth indexstring Yes Index name to create (e.g., "products", "logs-2024") settingsstring No Index settings as JSON string mappingsstring No Index mappings as JSON string
Parameter Type Description acknowledgedboolean Whether the request was acknowledged shards_acknowledgedboolean Whether the shards were acknowledged indexstring Created index name
Delete an index and all its documents. This operation is irreversible.
Inputs and outputsParameter Type Required Description deploymentTypestring Yes Deployment type: self_hosted or cloud hoststring No Elasticsearch host URL (for self-hosted) cloudIdstring No Elastic Cloud ID (for cloud deployments) authMethodstring Yes Authentication method: api_key or basic_auth apiKeystring No Elasticsearch API key usernamestring No Username for basic auth passwordstring No Password for basic auth indexstring Yes Index name to delete (e.g., "products", "logs-2024")
Parameter Type Description acknowledgedboolean Whether the deletion was acknowledged
Retrieve index information including settings, mappings, and aliases.
Inputs and outputsParameter Type Required Description deploymentTypestring Yes Deployment type: self_hosted or cloud hoststring No Elasticsearch host URL (for self-hosted) cloudIdstring No Elastic Cloud ID (for cloud deployments) authMethodstring Yes Authentication method: api_key or basic_auth apiKeystring No Elasticsearch API key usernamestring No Username for basic auth passwordstring No Password for basic auth indexstring Yes Index name to retrieve info for (e.g., "products", "logs-2024")
Parameter Type Description indicesjson Matched indices keyed by index name, each with its aliases, mappings, and settings
Get the health status of the Elasticsearch cluster.
Inputs and outputsParameter Type Required Description deploymentTypestring Yes Deployment type: self_hosted or cloud hoststring No Elasticsearch host URL (for self-hosted) cloudIdstring No Elastic Cloud ID (for cloud deployments) authMethodstring Yes Authentication method: api_key or basic_auth apiKeystring No Elasticsearch API key usernamestring No Username for basic auth passwordstring No Password for basic auth waitForStatusstring No Wait until cluster reaches this status: green, yellow, or red clusterTimeoutstring No How long Elasticsearch waits for the cluster to reach the requested status, as an Elasticsearch time value (e.g., 30s, 1m). Not named "timeout": that name is reserved by the tool transport as a client-side abort deadline in milliseconds.
Parameter Type Description cluster_namestring Name of the cluster statusstring Cluster health status: green, yellow, or red number_of_nodesnumber Total number of nodes in the cluster number_of_data_nodesnumber Number of data nodes active_shardsnumber Number of active shards unassigned_shardsnumber Number of unassigned shards
Get Elasticsearch cluster health, node counts, and index statistics.
Inputs and outputsParameter Type Required Description deploymentTypestring Yes Deployment type: self_hosted or cloud hoststring No Elasticsearch host URL (for self-hosted) cloudIdstring No Elastic Cloud ID (for cloud deployments) authMethodstring Yes Authentication method: api_key or basic_auth apiKeystring No Elasticsearch API key usernamestring No Username for basic auth passwordstring No Password for basic auth
Parameter Type Description cluster_namestring Name of the cluster statusstring Cluster health status nodesobject Node statistics including count and versions indicesobject Index statistics including document count and store size
List all indices in the Elasticsearch cluster with their health, status, and statistics.
Inputs and outputsParameter Type Required Description deploymentTypestring Yes Deployment type: self_hosted or cloud hoststring No Elasticsearch host URL (for self-hosted) cloudIdstring No Elastic Cloud ID (for cloud deployments) authMethodstring Yes Authentication method: api_key or basic_auth apiKeystring No Elasticsearch API key usernamestring No Username for basic auth passwordstring No Password for basic auth includeSystemIndicesboolean No Include Elasticsearch system indices (names starting with "."). Omitted by default.
Parameter Type Description messagestring Summary message about the indices indicesjson Array of index information objects (index, health, status, docsCount, storeSize, primaryShards, replicaShards). System indices are omitted unless includeSystemIndices is set.