Integrate OpenSearch into workflows to search, index, and manage data. Supports document CRUD operations, Query DSL search, bulk operations, index management, and cluster monitoring. Works with self-hosted clusters, Amazon OpenSearch Service domains, and Amazon OpenSearch Serverless collections, using basic auth or AWS Signature Version 4.
Search documents in OpenSearch using Query DSL. Returns matching documents with scores and metadata.
| Parameter | Type | Required | Description |
|---|
host | string | Yes | OpenSearch endpoint URL (e.g., https://localhost:9200 or https://search-my-domain.us-east-1.es.amazonaws.com) |
authMethod | string | Yes | Authentication method: basic_auth, aws_sigv4, or none |
username | string | No | Username for basic auth |
password | string | No | Password for basic auth |
awsRegion | string | No | AWS region of the domain or collection (e.g., us-east-1) |
awsService | string | No | AWS service to sign for: es (managed domain) or aoss (serverless collection) |
accessKeyId | string | No | AWS access key ID |
secretAccessKey | string | No | AWS secret access key |
sessionToken | string | No | AWS session token, for temporary credentials |
index | string | Yes | Index name or pattern to search (e.g., "products", "logs-*") |
query | string | No | Query DSL as JSON string. Example: {"match":{"title":"search term"}} or {"bool":{"must":[...]}} |
from | number | No | Starting offset for pagination (e.g., 0, 10, 20). Default: 0 |
size | number | No | Number of results to return (e.g., 10, 25, 100). Default: 10 |
sort | string | No | Sort specification as JSON string. Example: [{"created_at":{"order":"desc"}}] or [{"_score":"desc"},{"name":"asc"}] |
sourceIncludes | string | No | Comma-separated list of fields to include in _source |
sourceExcludes | string | No | Comma-separated list of fields to exclude from _source |
trackTotalHits | boolean | No | Count every matching document instead of stopping at 10,000 |
| Parameter | Type | Description |
|---|
took | number | Time in milliseconds the search took |
timed_out | boolean | Whether the search timed out |
hits | object | Search results: total (value, relation), max_score, and hits (each with _index, _id, _score, _source) |
aggregations | json | Aggregation results, when the query requested any |
Index (create or replace) a document in OpenSearch. Omit the document ID to let OpenSearch generate one.
| Parameter | Type | Required | Description |
|---|
host | string | Yes | OpenSearch endpoint URL (e.g., https://localhost:9200 or https://search-my-domain.us-east-1.es.amazonaws.com) |
authMethod | string | Yes | Authentication method: basic_auth, aws_sigv4, or none |
username | string | No | Username for basic auth |
password | string | No | Password for basic auth |
awsRegion | string | No | AWS region of the domain or collection (e.g., us-east-1) |
awsService | string | No | AWS service to sign for: es (managed domain) or aoss (serverless collection) |
accessKeyId | string | No | AWS access key ID |
secretAccessKey | string | No | AWS secret access key |
sessionToken | string | No | AWS session token, for temporary credentials |
index | string | Yes | Target index name (e.g., "products") |
documentId | string | No | Document ID. Omit to auto-generate one |
document | string | Yes | Document body as JSON string. Example: {"name":"Widget","price":9.99} |
refresh | string | No | Refresh policy: true, false, or wait_for |
| Parameter | Type | Description |
|---|
_index | string | Index where the document was stored |
_id | string | Document ID |
_version | number | Document version |
result | string | Operation result (created or updated) |
Retrieve a document by ID from an OpenSearch index.
| Parameter | Type | Required | Description |
|---|
host | string | Yes | OpenSearch endpoint URL (e.g., https://localhost:9200 or https://search-my-domain.us-east-1.es.amazonaws.com) |
authMethod | string | Yes | Authentication method: basic_auth, aws_sigv4, or none |
username | string | No | Username for basic auth |
password | string | No | Password for basic auth |
awsRegion | string | No | AWS region of the domain or collection (e.g., us-east-1) |
awsService | string | No | AWS service to sign for: es (managed domain) or aoss (serverless collection) |
accessKeyId | string | No | AWS access key ID |
secretAccessKey | string | No | AWS secret access key |
sessionToken | string | No | AWS session token, for temporary credentials |
index | string | Yes | Index name (e.g., "products") |
documentId | string | Yes | ID of the document to retrieve |
sourceIncludes | string | No | Comma-separated list of fields to include in _source |
sourceExcludes | string | No | Comma-separated list of fields to exclude from _source |
| Parameter | Type | Description |
|---|
_index | string | Index name |
_id | string | Document ID |
_version | number | Document version |
found | boolean | Whether the document was found |
_source | json | Document content |
Partially update a document in OpenSearch. Only the given fields change; the rest are kept.
| Parameter | Type | Required | Description |
|---|
host | string | Yes | OpenSearch endpoint URL (e.g., https://localhost:9200 or https://search-my-domain.us-east-1.es.amazonaws.com) |
authMethod | string | Yes | Authentication method: basic_auth, aws_sigv4, or none |
username | string | No | Username for basic auth |
password | string | No | Password for basic auth |
awsRegion | string | No | AWS region of the domain or collection (e.g., us-east-1) |
awsService | string | No | AWS service to sign for: es (managed domain) or aoss (serverless collection) |
accessKeyId | string | No | AWS access key ID |
secretAccessKey | string | No | AWS secret access key |
sessionToken | string | No | AWS session token, for temporary credentials |
index | string | Yes | Index name (e.g., "products") |
documentId | string | Yes | ID of the document to update |
document | string | Yes | Partial document as JSON string. Example: {"price":12.5} |
retryOnConflict | number | No | Number of times to retry when a version conflict occurs |
| Parameter | Type | Description |
|---|
_index | string | Index name |
_id | string | Document ID |
_version | number | New document version |
result | string | Operation result (updated or noop) |
Delete a document by ID from an OpenSearch index.
| Parameter | Type | Required | Description |
|---|
host | string | Yes | OpenSearch endpoint URL (e.g., https://localhost:9200 or https://search-my-domain.us-east-1.es.amazonaws.com) |
authMethod | string | Yes | Authentication method: basic_auth, aws_sigv4, or none |
username | string | No | Username for basic auth |
password | string | No | Password for basic auth |
awsRegion | string | No | AWS region of the domain or collection (e.g., us-east-1) |
awsService | string | No | AWS service to sign for: es (managed domain) or aoss (serverless collection) |
accessKeyId | string | No | AWS access key ID |
secretAccessKey | string | No | AWS secret access key |
sessionToken | string | No | AWS session token, for temporary credentials |
index | string | Yes | Index name (e.g., "products") |
documentId | string | Yes | ID of the document to delete |
refresh | string | No | Refresh policy: true, false, or wait_for |
| Parameter | Type | Description |
|---|
_index | string | Index name |
_id | string | Document ID |
_version | number | Document version |
result | string | Operation result (deleted or not_found) |
Run many index, create, update, and delete operations in one OpenSearch request (NDJSON).
| Parameter | Type | Required | Description |
|---|
host | string | Yes | OpenSearch endpoint URL (e.g., https://localhost:9200 or https://search-my-domain.us-east-1.es.amazonaws.com) |
authMethod | string | Yes | Authentication method: basic_auth, aws_sigv4, or none |
username | string | No | Username for basic auth |
password | string | No | Password for basic auth |
awsRegion | string | No | AWS region of the domain or collection (e.g., us-east-1) |
awsService | string | No | AWS service to sign for: es (managed domain) or aoss (serverless collection) |
accessKeyId | string | No | AWS access key ID |
secretAccessKey | string | No | AWS secret access key |
sessionToken | string | No | AWS session token, for temporary credentials |
index | string | No | Default index for operations that do not name one (e.g., "products") |
operations | string | Yes | Bulk operations as NDJSON string: an action line, then a document line where the action needs one. Example: {"index":{"_index":"products","_id":"1"}}\n{"name":"Widget"}\n |
refresh | string | No | Refresh policy: true, false, or wait_for |
| Parameter | Type | Description |
|---|
took | number | Time in milliseconds the bulk request took |
errors | boolean | Whether any operation failed |
items | array | Result of each operation, keyed by action (index, create, update, delete) with _index, _id, result, status, and error when it failed |
Count the documents in an OpenSearch index, optionally matching a query.
| Parameter | Type | Required | Description |
|---|
host | string | Yes | OpenSearch endpoint URL (e.g., https://localhost:9200 or https://search-my-domain.us-east-1.es.amazonaws.com) |
authMethod | string | Yes | Authentication method: basic_auth, aws_sigv4, or none |
username | string | No | Username for basic auth |
password | string | No | Password for basic auth |
awsRegion | string | No | AWS region of the domain or collection (e.g., us-east-1) |
awsService | string | No | AWS service to sign for: es (managed domain) or aoss (serverless collection) |
accessKeyId | string | No | AWS access key ID |
secretAccessKey | string | No | AWS secret access key |
sessionToken | string | No | AWS session token, for temporary credentials |
index | string | Yes | Index name or pattern (e.g., "products", "logs-*") |
query | string | No | Query DSL as JSON string. Omit to count every document |
| Parameter | Type | Description |
|---|
count | number | Number of documents matching the query |
_shards | object | Shard statistics (total, successful, skipped, failed) |
Create an OpenSearch index with optional settings and mappings.
| Parameter | Type | Required | Description |
|---|
host | string | Yes | OpenSearch endpoint URL (e.g., https://localhost:9200 or https://search-my-domain.us-east-1.es.amazonaws.com) |
authMethod | string | Yes | Authentication method: basic_auth, aws_sigv4, or none |
username | string | No | Username for basic auth |
password | string | No | Password for basic auth |
awsRegion | string | No | AWS region of the domain or collection (e.g., us-east-1) |
awsService | string | No | AWS service to sign for: es (managed domain) or aoss (serverless collection) |
accessKeyId | string | No | AWS access key ID |
secretAccessKey | string | No | AWS secret access key |
sessionToken | string | No | AWS session token, for temporary credentials |
index | string | Yes | Name of the index to create (lowercase, e.g., "products") |
settings | string | No | Index settings as JSON string. Example: {"number_of_shards":1,"number_of_replicas":1} |
mappings | string | No | Index mappings as JSON string. Example: {"properties":{"title":{"type":"text"}}} |
| Parameter | Type | Description |
|---|
acknowledged | boolean | Whether the request was acknowledged |
shards_acknowledged | boolean | Whether the shards started before the request timed out |
index | string | Created index name |
Delete an OpenSearch index and every document in it. This cannot be undone.
| Parameter | Type | Required | Description |
|---|
host | string | Yes | OpenSearch endpoint URL (e.g., https://localhost:9200 or https://search-my-domain.us-east-1.es.amazonaws.com) |
authMethod | string | Yes | Authentication method: basic_auth, aws_sigv4, or none |
username | string | No | Username for basic auth |
password | string | No | Password for basic auth |
awsRegion | string | No | AWS region of the domain or collection (e.g., us-east-1) |
awsService | string | No | AWS service to sign for: es (managed domain) or aoss (serverless collection) |
accessKeyId | string | No | AWS access key ID |
secretAccessKey | string | No | AWS secret access key |
sessionToken | string | No | AWS session token, for temporary credentials |
index | string | Yes | Name of the index to delete |
| Parameter | Type | Description |
|---|
acknowledged | boolean | Whether the deletion was acknowledged |
Read the aliases, mappings, and settings of one or more OpenSearch indices.
| Parameter | Type | Required | Description |
|---|
host | string | Yes | OpenSearch endpoint URL (e.g., https://localhost:9200 or https://search-my-domain.us-east-1.es.amazonaws.com) |
authMethod | string | Yes | Authentication method: basic_auth, aws_sigv4, or none |
username | string | No | Username for basic auth |
password | string | No | Password for basic auth |
awsRegion | string | No | AWS region of the domain or collection (e.g., us-east-1) |
awsService | string | No | AWS service to sign for: es (managed domain) or aoss (serverless collection) |
accessKeyId | string | No | AWS access key ID |
secretAccessKey | string | No | AWS secret access key |
sessionToken | string | No | AWS session token, for temporary credentials |
index | string | Yes | Index name or pattern (e.g., "products", "logs-*") |
| Parameter | Type | Description |
|---|
indices | json | Matched indices keyed by index name, each with its aliases, mappings, and settings |
List the indices in the OpenSearch cluster with their health, document count, and size.
| Parameter | Type | Required | Description |
|---|
host | string | Yes | OpenSearch endpoint URL (e.g., https://localhost:9200 or https://search-my-domain.us-east-1.es.amazonaws.com) |
authMethod | string | Yes | Authentication method: basic_auth, aws_sigv4, or none |
username | string | No | Username for basic auth |
password | string | No | Password for basic auth |
awsRegion | string | No | AWS region of the domain or collection (e.g., us-east-1) |
awsService | string | No | AWS service to sign for: es (managed domain) or aoss (serverless collection) |
accessKeyId | string | No | AWS access key ID |
secretAccessKey | string | No | AWS secret access key |
sessionToken | string | No | AWS session token, for temporary credentials |
includeSystemIndices | boolean | No | Include indices whose name starts with "." (system and plugin indices) |
| Parameter | Type | Description |
|---|
message | string | Summary message about the indices |
indices | json | Array of index information objects (index, health, status, docsCount, storeSize, primaryShards, replicaShards). System indices are omitted unless includeSystemIndices is set. |
Get the health status of the OpenSearch cluster.
| Parameter | Type | Required | Description |
|---|
host | string | Yes | OpenSearch endpoint URL (e.g., https://localhost:9200 or https://search-my-domain.us-east-1.es.amazonaws.com) |
authMethod | string | Yes | Authentication method: basic_auth, aws_sigv4, or none |
username | string | No | Username for basic auth |
password | string | No | Password for basic auth |
awsRegion | string | No | AWS region of the domain or collection (e.g., us-east-1) |
awsService | string | No | AWS service to sign for: es (managed domain) or aoss (serverless collection) |
accessKeyId | string | No | AWS access key ID |
secretAccessKey | string | No | AWS secret access key |
sessionToken | string | No | AWS session token, for temporary credentials |
waitForStatus | string | No | Wait until the cluster reaches this status: green, yellow, or red |
clusterTimeout | string | No | How long OpenSearch waits for the requested status, as a time value (e.g., 30s, 1m). Not named "timeout": the tool transport reserves that name for its client-side deadline. |
| Parameter | Type | Description |
|---|
cluster_name | string | Name of the cluster |
status | string | Cluster health status: green, yellow, or red |
timed_out | boolean | Whether the wait for the requested status timed out |
number_of_nodes | number | Total number of nodes in the cluster |
number_of_data_nodes | number | Number of data nodes |
active_primary_shards | number | Number of active primary shards |
active_shards | number | Number of active shards |
relocating_shards | number | Number of shards being relocated |
initializing_shards | number | Number of shards being initialized |
unassigned_shards | number | Number of unassigned shards |
number_of_pending_tasks | number | Number of cluster-level changes not yet executed |
active_shards_percent_as_number | number | Percentage of shards that are active |
Get cluster-wide statistics for OpenSearch: node counts and versions, document counts, storage, and shards.
| Parameter | Type | Required | Description |
|---|
host | string | Yes | OpenSearch endpoint URL (e.g., https://localhost:9200 or https://search-my-domain.us-east-1.es.amazonaws.com) |
authMethod | string | Yes | Authentication method: basic_auth, aws_sigv4, or none |
username | string | No | Username for basic auth |
password | string | No | Password for basic auth |
awsRegion | string | No | AWS region of the domain or collection (e.g., us-east-1) |
awsService | string | No | AWS service to sign for: es (managed domain) or aoss (serverless collection) |
accessKeyId | string | No | AWS access key ID |
secretAccessKey | string | No | AWS secret access key |
sessionToken | string | No | AWS session token, for temporary credentials |
| Parameter | Type | Description |
|---|
cluster_name | string | Name of the cluster |
cluster_uuid | string | Unique ID of the cluster |
status | string | Cluster health status |
nodes | json | Node statistics (count by role, versions, os, process, jvm, fs, plugins) |
indices | json | Index statistics (count, docs, store, shards, fielddata, segments) |