Elasticsearch Vector Store icon

Elasticsearch Vector Store

Use Elasticsearch as a LangChain vector store for RAG workflows

Elasticsearch Vector Store

AI-generated

Summary

Connects an Elasticsearch index to an n8n workflow as a vector store for similarity search. Choose whether to expose it to a chain or retriever, or provide it as a tool to an AI Agent; searches use the connected embedding model and can apply exact-match filters.

Inputs

  • Index Name (required) — Elasticsearch index to search. Connect an Embedding sub-node. Add Search Filters to require exact matches on metadata fields or top-level fields; all configured filters must match. Search Options can set the per-shard candidate count before results are selected.
  • Name (required) — For AI Agent tool mode, the tool name; characters outside letters, numbers, underscores, and hyphens are replaced with underscores, and the name is capped at 64 characters.
  • Description (required) — For AI Agent tool mode, the description shown to the agent when it decides whether to call the tool.
  • Limit — For AI Agent tool mode, maximum number of similar documents returned per tool call; defaults to 4.

Output shape

An n8n AI Tool connection for AI Agent tool mode, or an AI Vector Store connection for chain/retriever mode.

This operation is supplied to downstream AI nodes as a sub-node and does not return regular workflow items. The agent tool accepts a query and returns JSON containing each matched document's content and metadata. Search filters and candidate count also apply to searches.

Examples

Example 1: Insert Documents mode is selected

Connect an Embedding sub-node, a Document input, and the main workflow input. Set the Index Name. Optionally configure batch size, metadata keys to retain, custom top-level fields, chunk indexing, or clear the index before inserting.

Example 2: Get Many mode is selected

Connect an Embedding sub-node and main workflow input, then provide a Prompt and optionally set the result limit, include metadata, filters, or candidate count.

Links

Discussion