OpenSearch Vector Store icon

OpenSearch Vector Store

Work with your data in OpenSearch for vector-based search

OpenSearch Vector Store

AI-generated

Summary

Search an OpenSearch index for vector-similar documents, insert or update embedded documents, or expose the index as a vector store or AI Agent tool. Connect an embedding model and choose an operation mode; search modes can optionally apply metadata filters and a connected reranker.

Inputs

  • Operation Mode (required) — Choose Get Many, Insert Documents, Retrieve as Vector Store, Retrieve as Tool, or Update Documents. Each mode requires an embedding model.
  • Index Name (required) — Select an OpenSearch index from the list or enter its name. Insert and update modes can create the index when needed.
  • Prompt (required) — For Get Many, the query text to embed and use for similarity search.
  • Limit — For Get Many and Retrieve as Tool, maximum number of matches to fetch; defaults to 4.
  • Include Metadata — For Get Many and Retrieve as Tool, whether returned documents include metadata; defaults to true.
  • Metadata Filter — For Get Many, Retrieve as Vector Store, and Retrieve as Tool, add metadata name/value pairs to restrict matches.
  • Rerank Results — For search and retrieval modes, enable reranking; when enabled, connect a reranker.
  • Name (required) — For older node versions in Retrieve as Tool mode, the tool name shown to AI agents.
  • Description (required) — For Retrieve as Tool, describe the search tool to the AI agent.
  • Embedding Batch Size — For Insert Documents and Update Documents on node versions 1.1 and later, number of documents embedded per batch; defaults to 200.
  • Vector Search Engine — For Insert Documents and Update Documents, choose Lucene, Faiss, or legacy NMSLIB; defaults to Lucene.
  • Clear Index — For Insert Documents, delete the index before adding documents; defaults to false.
  • Field Names — Configure the vector, text, and metadata fields used in the index; defaults to embedding, text, and metadata.
  • ID (required) — For Update Documents, the ID of the document to replace. Incoming items must also contain text, pageContent, or content, and may contain metadata.

Output shape

Depends on the selected mode: Get Many, Insert Documents, and Update Documents return regular n8n items; Retrieve as Vector Store returns an AI Vector Store connection; Retrieve as Tool returns an AI Tool connection.

Get Many emits one item per match with document.pageContent, optional document.metadata, and score. Insert and update emit the processed or updated documents with pageContent and metadata. Retrieve as Vector Store supplies a vector store for connected AI nodes. Retrieve as Tool answers queries from the input item's input field, returning matching document text and, by default, metadata. Insert mode consumes documents from an AI Document connection; update mode consumes regular input items. Retrieval modes use the configured index and optional metadata filter.

Links

Discussion