这将帮助你开始使用 Elasticsearch 键值存储。 所有Documentation Index
Fetch the complete documentation index at: https://nvd-54.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
ElasticsearchEmbeddingsCache 功能和配置的详细文档请前往 API reference.
概述
TheElasticsearchEmbeddingsCache is a ByteStore implementation that uses your Elasticsearch instance for efficient storage and retrieval of embeddings.
集成详情
| Class | Package | Local | JS support | Downloads | Version |
|---|---|---|---|---|---|
ElasticsearchEmbeddingsCache | langchain-elasticsearch | ✅ | ❌ |
设置
To create aElasticsearchEmbeddingsCache byte store, you’ll need an Elasticsearch cluster. You can set one up locally or create an Elastic account.
安装
The LangChainElasticsearchEmbeddingsCache integration lives in the langchain-elasticsearch package:
Instantiation
Now we can instantiate our byte store:使用方法
You can set data under keys like this using themset method:
mdelete method:
Use as an embeddings cache
Like otherByteStores, you can use an ElasticsearchEmbeddingsCache instance for persistent caching in document ingestion for RAG.
However, cached vectors won’t be searchable by default. The developer can customize the building of the Elasticsearch document in order to add indexed vector field.
This can be done by subclassing and overriding methods:
API 参考
所有ElasticsearchEmbeddingsCache features and configurations, head to the API reference
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

