OpenSearch icon

OpenSearch

Consume the OpenSearch API

Document → Search

AI-generated

Summary

Searches an OpenSearch index using a plain-text term or an OpenSearch query. Returns matching hits, optionally simplified to each hit’s _id and _source fields.

Inputs

  • Index ID (required) — ID of the index to search.
  • Query (required) — A plain-text term, which is sent as a query_string query, or a JSON string/object containing an OpenSearch query. Defaults to a match_all query.
  • Return All — When false, return up to the Limit (default 50). When true, request up to 10,000 results; enable Use Scroll to paginate through more results.
  • Limit — Maximum number of hits when Return All is false; defaults to 50.
  • Simplify — Defaults to true. Simplified output includes each hit’s _id and fields from _source; when false, each raw OpenSearch hit is returned.
  • Options — Optional search settings: Sort, Source Includes, Source Excludes, and Track Total Hits are passed as search parameters. Use Scroll enables scroll pagination when Return All is true; Scroll Time sets the scroll context lifetime in minutes (default 1).

Output shape

A list of n8n items, one per matching hit.

With Simplify enabled, each item contains _id and the hit’s _source fields. Otherwise, each item contains the raw hit object. Return All without Use Scroll makes one request sized to 10,000; Use Scroll paginates results. Search errors are reported as node errors.

Links

Discussion