@dic11i/n8n-nodes-elasticsearch-vectorstore
v0.1.9
Published
n8n community node for Elasticsearch vector store tool
Maintainers
Readme
n8n-nodes-elasticsearch-vectorstore
Production-ready n8n community node that provides an Elasticsearch Vector Store Tool node with upsert and similarity search operations. Supports Elasticsearch 7.5 and 8.11, using the built-in Elasticsearch credential and Embedding node input.
Features
- Upsert documents with embeddings into Elasticsearch
- Similarity search using kNN (ES 8.11) or script_score fallback (ES 7.5)
- Embedding node input (ai_embedding)
- Optional index creation with mapping
- Deterministic hash IDs based on text+metadata
Compatibility
- Elasticsearch 7.5 and 8.11
- n8n self-hosted (including Kubernetes)
Credentials
- Elasticsearch API: Uses the same fields as n8n built-in Elasticsearch credential (basic auth, base URL, SSL ignore)
Node Parameters
- Connection: Elasticsearch credentials, Index Name
- Embeddings: Embedding node input, vector dimensions, batch size
- Upsert: text/id/metadata fields, auto-generate ID, ensure index
- Search: search mode (AUTO/KNN/SCRIPT_SCORE), topK, minScore
Build & Run
npm install
npm run build
npm packInstall in n8n
Option A: Community package installation (UI)
- Enable community packages in n8n (Settings → Community Nodes).
- Install
n8n-nodes-elasticsearch-vectorstore.
Option B: Bake into a custom Docker image (K8s friendly)
FROM n8nio/n8n:latest
USER root
RUN npm install /path/to/n8n-nodes-elasticsearch-vectorstore.tgz
USER nodeRestart the deployment after updating the image.
Option C: Mount as custom extension
Build and copy the package to the custom extensions directory:
export N8N_CUSTOM_EXTENSIONS=/home/node/.n8n/custom
mkdir -p /home/node/.n8n/custom
cp -R /path/to/n8n-nodes-elasticsearch-vectorstore /home/node/.n8n/customRestart n8n.
How to test locally
npm install
npm run devOpen http://localhost:5678, create a workflow, and add the Elasticsearch Vector Store Tool node.
Using an Embedding Node Input
Set Embedding Source to Use Embedding Node and connect your Embeddings node to the Embeddings input of the Elasticsearch Vector Store Tool node.
Use as AI Agent Tool
Set Operation to Similarity Search (As Tool) and connect the Elasticsearch Vector Store Tool node to the AI Agent Tool port. Connect an Embeddings node to the Embeddings input.
Example workflow JSON (Upsert)
{
"nodes": [
{
"parameters": {
"operation": "upsert",
"indexName": "documents",
"ensureIndex": true,
"vectorDimensions": 1536,
"batchSize": 10,
"textField": "text",
"idField": "id",
"metadataField": "metadata",
"autoId": "hash"
},
"name": "Elasticsearch Vector Store Tool",
"type": "n8n-nodes-elasticsearch-vectorstore.elasticsearchVectorStoreTool",
"typeVersion": 1,
"position": [520, 300],
"credentials": {
"elasticsearchApi": {
"id": "1",
"name": "ES Cluster"
}
}
}
],
"connections": {}
}Example workflow JSON (Similarity Search)
{
"nodes": [
{
"parameters": {
"operation": "search",
"indexName": "documents",
"ensureIndex": false,
"vectorDimensions": 1536,
"batchSize": 5,
"query": "Find related documents to prompt engineering",
"searchMode": "auto",
"topK": 5,
"minScore": 0
},
"name": "Elasticsearch Vector Store Tool",
"type": "n8n-nodes-elasticsearch-vectorstore.elasticsearchVectorStoreTool",
"typeVersion": 1,
"position": [520, 300],
"credentials": {
"elasticsearchApi": {
"id": "1",
"name": "ES Cluster"
}
}
}
],
"connections": {}
}