index_name="test-elser",    strategy=ElasticsearchStore.SparseVectorRetrievalStrategy())db.client.indices.refresh(index="test-elser")results = db.similarity_search("What did the president say about Ketanji Brown Jackson", k=4)print(results[0])    page_content='One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \n\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation‚Äôs top legal minds, who will continue Justice Breyer‚Äôs legacy of excellence.' metadata={'source': '../../modules/state_of_the_union.txt'}ExactRetrievalStrategy‚ÄãThis strategy uses Elasticsearch's exact retrieval (also known as brute force) to retrieve the top-k results.To use this, specify ExactRetrievalStrategy in ElasticsearchStore constructor.db = ElasticsearchStore.from_documents(    docs,     embeddings,     es_url="http://localhost:9200",     index_name="test",    strategy=ElasticsearchStore.ExactRetrievalStrategy())Customise the Query‚ÄãWith custom_query parameter at search, you are able to adjust the query that is used to retrieve documents from Elasticsearch. This is useful if you want to want to use a more complex query, to support linear boosting of fields.# Example of a custom query thats just doing a BM25 search on the text field.def custom_query(query_body: dict, query: str):    """Custom query to be used in Elasticsearch.    Args:        query_body (dict): Elasticsearch query body.        query (str): Query string.    Returns:        dict: Elasticsearch query body.    """    print("Query Retriever created by the retrieval strategy:")    print(query_body)    print()    new_query_body = {        "query": {            "match": {                "text": query            }        }    }    print("Query thats actually used in Elasticsearch:")    print(new_query_body)    print()    return new_query_bodyresults = db.similarity_search("What
Elasticsearch is a distributed, RESTful search and analytics engine, capable of performing both vector and lexical search. It is built on top of the Apache Lucene library.
Elasticsearch is a distributed, RESTful search and analytics engine, capable of performing both vector and lexical search. It is built on top of the Apache Lucene library. ->: index_name="test-elser",    strategy=ElasticsearchStore.SparseVectorRetrievalStrategy())db.client.indices.refresh(index="test-elser")results = db.similarity_search("What did the president say about Ketanji Brown Jackson", k=4)print(results[0])    page_content='One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \n\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation‚Äôs top legal minds, who will continue Justice Breyer‚Äôs legacy of excellence.' metadata={'source': '../../modules/state_of_the_union.txt'}ExactRetrievalStrategy‚ÄãThis strategy uses Elasticsearch's exact retrieval (also known as brute force) to retrieve the top-k results.To use this, specify ExactRetrievalStrategy in ElasticsearchStore constructor.db = ElasticsearchStore.from_documents(    docs,     embeddings,     es_url="http://localhost:9200",     index_name="test",    strategy=ElasticsearchStore.ExactRetrievalStrategy())Customise the Query‚ÄãWith custom_query parameter at search, you are able to adjust the query that is used to retrieve documents from Elasticsearch. This is useful if you want to want to use a more complex query, to support linear boosting of fields.# Example of a custom query thats just doing a BM25 search on the text field.def custom_query(query_body: dict, query: str):    """Custom query to be used in Elasticsearch.    Args:        query_body (dict): Elasticsearch query body.        query (str): Query string.    Returns:        dict: Elasticsearch query body.    """    print("Query Retriever created by the retrieval strategy:")    print(query_body)    print()    new_query_body = {        "query": {            "match": {                "text": query            }        }    }    print("Query thats actually used in Elasticsearch:")    print(new_query_body)    print()    return new_query_bodyresults = db.similarity_search("What