= db.similarity_search("What did the president say about Ketanji Brown Jackson", k=4, custom_query=custom_query)print("Results:")print(results[0])    Query Retriever created by the retrieval strategy:    {'query': {'bool': {'must': [{'text_expansion': {'vector.tokens': {'model_id': '.elser_model_1', 'model_text': 'What did the president say about Ketanji Brown Jackson'}}}], 'filter': []}}}        Query thats actually used in Elasticsearch:    {'query': {'match': {'text': 'What did the president say about Ketanji Brown Jackson'}}}        Results:    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'}FAQQuestion: Im getting timeout errors when indexing documents into Elasticsearch. How do I fix this?‚ÄãOne possible issue is your documents might take longer to index into Elasticsearch. ElasticsearchStore uses the Elasticsearch bulk API which has a few defaults that you can adjust to reduce the chance of timeout errors.This is also a good idea when you're using SparseVectorRetrievalStrategy.The defaults are:chunk_size: 500max_chunk_bytes: 100MBTo adjust these, you can pass in the chunk_size and max_chunk_bytes parameters to the ElasticsearchStore add_texts method.    vector_store.add_texts(        texts,        bulk_kwargs={            "chunk_size": 50,            "max_chunk_bytes": 200000000        }    )Upgrading to ElasticsearchStoreIf you're already using Elasticsearch in your langchain based project, you may be using the old implementations: ElasticVectorSearch and ElasticKNNSearch which are now deprecated. We've introduced a new implementation called ElasticsearchStore which is more flexible and easier to
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. ->: = db.similarity_search("What did the president say about Ketanji Brown Jackson", k=4, custom_query=custom_query)print("Results:")print(results[0])    Query Retriever created by the retrieval strategy:    {'query': {'bool': {'must': [{'text_expansion': {'vector.tokens': {'model_id': '.elser_model_1', 'model_text': 'What did the president say about Ketanji Brown Jackson'}}}], 'filter': []}}}        Query thats actually used in Elasticsearch:    {'query': {'match': {'text': 'What did the president say about Ketanji Brown Jackson'}}}        Results:    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'}FAQQuestion: Im getting timeout errors when indexing documents into Elasticsearch. How do I fix this?‚ÄãOne possible issue is your documents might take longer to index into Elasticsearch. ElasticsearchStore uses the Elasticsearch bulk API which has a few defaults that you can adjust to reduce the chance of timeout errors.This is also a good idea when you're using SparseVectorRetrievalStrategy.The defaults are:chunk_size: 500max_chunk_bytes: 100MBTo adjust these, you can pass in the chunk_size and max_chunk_bytes parameters to the ElasticsearchStore add_texts method.    vector_store.add_texts(        texts,        bulk_kwargs={            "chunk_size": 50,            "max_chunk_bytes": 200000000        }    )Upgrading to ElasticsearchStoreIf you're already using Elasticsearch in your langchain based project, you may be using the old implementations: ElasticVectorSearch and ElasticKNNSearch which are now deprecated. We've introduced a new implementation called ElasticsearchStore which is more flexible and easier to