Elasticsearch Advance Retrieve icon

Elasticsearch Advance Retrieve

Advanced document retrieval from Elasticsearch

Overview

This node performs advanced document retrieval from an Elasticsearch index by executing a user-defined JSON query. It is useful for scenarios where you need to search and filter documents stored in Elasticsearch with complex queries beyond simple keyword matching. For example, you can use it to retrieve documents that match specific criteria, aggregate data, or perform full-text searches.

Practical examples include:

  • Searching logs or event data stored in Elasticsearch based on custom filters.
  • Retrieving product information from an Elasticsearch index using structured queries.
  • Running analytics queries to extract insights from indexed documents.

Properties

Name Meaning
Index The name of the Elasticsearch index to search within.
Query (JSON) The Elasticsearch query expressed in JSON format. This defines the search criteria.

Output

The node outputs an array of items, each containing a json object representing a single document retrieved from Elasticsearch. Each document includes:

  • _id: The unique identifier of the document.
  • _score: The relevance score assigned by Elasticsearch for the query.
  • All fields from the document's _source as individual properties.

No binary data output is produced by this node.

Dependencies

  • Requires access to an Elasticsearch instance.
  • Needs credentials providing the host URL and either an API key or username/password for authentication.
  • Uses HTTP requests via Axios to communicate with Elasticsearch.
  • The node expects the user to provide valid JSON queries.

Troubleshooting

  • Invalid JSON Query: If the query property is not valid JSON, the node throws an error indicating the query must be valid JSON. Ensure your query syntax is correct.
  • Authentication Errors: If credentials are incorrect or missing, the node will fail to connect. Verify the API key or username/password.
  • Elasticsearch Errors: If Elasticsearch returns an error (e.g., index not found, malformed query), the node surfaces the error message. Check the query structure and index name.
  • Network Issues: Connection failures to the Elasticsearch host will cause errors. Confirm network accessibility and correct host URL.

Links and References

Discussion