Elasticsearch
Elasticsearch is a distributed, RESTful search and analytics engine. It provides a distributed, multi-tenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents.
Installation and Setupβ
There are two ways to get started with Elasticsearch:
Install Elasticsearch on your local machine via dockerβ
Example: Run a single-node Elasticsearch instance with security disabled. This is not recommended for production use.
docker run -p 9200:9200 -e "discovery.type=single-node" -e "xpack.security.enabled=false" -e "xpack.security.http.ssl.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:8.9.0
Deploy Elasticsearch on Elastic Cloudβ
Elastic Cloud is a managed Elasticsearch service. Signup for a free trial.
Install Clientβ
pip install elasticsearch
pip install langchain-elasticsearch
Embedding modelsβ
See a usage example.
from langchain_elasticsearch.embeddings import ElasticsearchEmbeddings
API Reference:ElasticsearchEmbeddings
Vector storeβ
See a usage example.
from langchain_elasticsearch.vectorstores import ElasticsearchStore
API Reference:ElasticsearchStore
Memoryβ
See a usage example.
from langchain_elasticsearch.chat_history import ElasticsearchChatMessageHistory
API Reference:ElasticsearchChatMessageHistory