OpenSearch icon

OpenSearch

Consume the OpenSearch API

Actions9

Overview

This node interacts with the OpenSearch API, allowing users to manage and manipulate search indexes and documents within those indexes. Specifically, for the Index - Delete operation, it deletes an existing index by its ID. This is useful when you want to remove an entire index and all its associated data from your OpenSearch cluster.

Common scenarios include:

  • Cleaning up unused or obsolete indexes to free storage.
  • Automating index lifecycle management in workflows.
  • Removing test or temporary indexes after processing.

Example: Deleting an index named "products_2023" to remove outdated product data.

Properties

Name Meaning
Index ID The unique identifier (name) of the index to delete.

Output

The output JSON for the delete index operation contains a simple success confirmation object:

{
  "success": true
}

This indicates that the index was successfully deleted. If the deletion fails, an error will be thrown instead.

No binary data is output by this operation.

Dependencies

  • Requires an active connection to an OpenSearch cluster.
  • Needs an API authentication token or API key credential configured in n8n to authorize requests to the OpenSearch API.
  • The node uses internal helper functions to make HTTP DELETE requests to the OpenSearch REST API.

Troubleshooting

  • Error: Index not found — Occurs if the specified index ID does not exist. Verify the index name is correct.
  • Authentication errors — Ensure the API key or token used has sufficient permissions to delete indexes.
  • Network issues — Confirm connectivity to the OpenSearch endpoint.
  • Bulk operation limits — The node batches bulk operations in groups of 50; exceeding limits may cause errors.
  • If the node throws an error with a message and description, check the item index indicated to identify which input caused the failure.
  • Use the "Continue On Fail" option to allow workflow execution to proceed despite individual item errors.

Links and References

Discussion