ElasticsearchEmbeddings 类最简单的方式是:
- 如果使用 Elastic Cloud,则使用
from_credentials构造函数 - 或者使用
from_es_connection构造函数连接任意 Elasticsearch 集群
使用 from_credentials 进行测试
这需要 Elastic Cloud 的 cloud_id
使用现有的 Elasticsearch 客户端连接进行测试
这可用于任何 Elasticsearch 部署Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

