from langchain.embeddings.openai import OpenAIEmbeddings
            from elasticsearch import Elasticsearch
            es_connection = Elasticsearch("http://localhost:9200")
            vectorstore = ElasticsearchStore(
                embedding=OpenAIEmbeddings(),
                index_name="langchain-demo",
                es_connection=es_connection
            )
    ElasticsearchStore by default uses the ApproxRetrievalStrategy, which uses the
    HNSW algorithm to perform approximate nearest neighbor search. This is the
    fastest and most memory efficient algorithm.
    If you want to use the Brute force / Exact strategy for searching vectors, you
    can pass in the ExactRetrievalStrategy to the ElasticsearchStore constructor.
    Example:
        .. code-block:: python
            from langchain.vectorstores import ElasticsearchStore
            from langchain.embeddings.openai import OpenAIEmbeddings
            vectorstore = ElasticsearchStore(
                embedding=OpenAIEmbeddings(),
                index_name="langchain-demo",
                es_url="http://localhost:9200",
                strategy=ElasticsearchStore.ExactRetrievalStrategy()
            )
    Both strategies require that you know the similarity metric you want to use
    when creating the index. The default is cosine similarity, but you can also
    use dot product or euclidean distance.
    Example:
        .. code-block:: python
            from langchain.vectorstores import ElasticsearchStore
            from langchain.embeddings.openai import OpenAIEmbeddings
            from langchain.vectorstores.utils import DistanceStrategy
            vectorstore = ElasticsearchStore(
                embedding=OpenAIEmbeddings(),
                index_name="langchain-demo",
                es_url="http://localhost:9200",
                distance_strategy="DOT_PRODUCT"
            )
    """
[docs]    def __init__(
        self,
        index_name: str,