Registry / llm-agents / llama-index-vector-stores-elasticsearch

llama-index-vector-stores-elasticsearch

JSON →
library0.6.0pypypi✓ verified 85d ago

Elasticsearch vector store integration for LlamaIndex. Provides ElasticsearchStore for indexing and querying vector embeddings with full Elasticsearch features. Current version: 0.6.0. Release cadence: follows llama-index releases.

pip install llama-index-vector-stores-elasticsearch
INSTALL
IMPORT
SIG · LLAMA-INDEX-VECTOR
L
llama-index-vector-stores-elasticsearch
llm-agentspythonv0.6.0
Install
18.9s avg
Import
6934ms
Disk
260MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 5.808s · 248.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 18.9s · import 5.286s · 245MB
260MB installed
● package 260MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ElasticsearchStore
from llama_index.vector_stores.elasticsearch import ElasticsearchStore
Official import path.

Initialize an ElasticsearchStore with environment variables for credentials.

import os from llama_index.vector_stores.elasticsearch import ElasticsearchStore vector_store = ElasticsearchStore( index_name="my_index", es_url=os.environ.get("ES_URL", "http://localhost:9200"), es_user=os.environ.get("ES_USER", "elastic"), es_password=os.environ.get("ES_PASSWORD", "changeme"), ) print("Elasticsearch store created successfully.")
Debug
Known issues
breakingIn version 0.6.0, the parameter `es_url` replaced the deprecated `host` and `port` parameters. Code using old parameters will fail.
fix
Use `es_url` instead of `host` and `port`.
affects: <0.6.0
deprecatedThe `distance_strategy` parameter is deprecated in favor of using `similarity` parameter with values like "cosine" or "l2".
fix
Replace `distance_strategy="COSINE"` with `similarity="cosine"`.
affects: >=0.6.0
gotchaElasticsearchStore does not automatically create the index if it doesn't exist. You must either pre-create the index with appropriate mappings or use the `create_index` parameter.
fix
Set `create_index=True` when initializing the store, or manually create the index with proper dense_vector field mapping.
affects: all
gotchaWhen using authentication, ensure you pass both `es_user` and `es_password`. Passing only one may lead to unexpected connection errors.
fix
Always provide both user and password or use API key authentication.
affects: all
Errors
Common errors & fixes
elasticsearch.BadRequestError: BadRequestError(400, 'x_content_parse_exception', 'failed to parse field [mappings.properties.embedding]')
Elasticsearch index already exists with incorrect mapping for the embedding field (e.g., wrong dimension or type).
fix
Delete the existing index and let the store recreate it with correct mapping, or update the index mapping to match the expected dense_vector type.
AttributeError: module 'llama_index.vector_stores.elasticsearch' has no attribute 'ElasticsearchStore'
Old import path: from llama_index.vector_stores import ElasticsearchStore (incorrect).
fix
Use the correct import: from llama_index.vector_stores.elasticsearch import ElasticsearchStore
Upgrade
Version history
0.6.0latest on PyPI · released Mar 12, 2026
Audit
Dependencies
elasticsearchrequiredRequired for connecting to Elasticsearch instance.
llama-index-corerequiredCore dependency for vector store interface.
Agent activity
36 hits · last 30 days
node
28
OpenAI (training)
1
Resources
llama-index-vector-stores-elasticsearch — pip install llama-index-vector-stores-elasticsearch · libregistry