will be a combination of approximate semantic search and keyword based search. It will use rrf (Reciprocal Rank Fusion) to balance the two scores from different retrieval methods.Note RRF requires Elasticsearch 8.9.0 or above.{    "knn": {        "field": "vector",        "filter": [],        "k": 1,        "num_candidates": 50,        "query_vector": [1.0, ..., 0.0],    },    "query": {        "bool": {            "filter": [],            "must": [{"match": {"text": {"query": "foo"}}}],        }    },    "rank": {"rrf": {}},}Example: Approx with Embedding Model in Elasticsearch‚ÄãThis example will show how to configure ElasticsearchStore to use the embedding model deployed in Elasticsearch for approximate retrieval. To use this, specify the model_id in ElasticsearchStore ApproxRetrievalStrategy constructor via the query_model_id argument.NOTE This requires the model to be deployed and running in Elasticsearch ml node. See notebook example on how to deploy the model with eland.APPROX_SELF_DEPLOYED_INDEX_NAME = "test-approx-self-deployed"# Note: This does not have an embedding function specified# Instead, we will use the embedding model deployed in Elasticsearchdb = ElasticsearchStore(     es_cloud_id="<your cloud id>",    es_user="elastic",    es_password="<your password>",     index_name=APPROX_SELF_DEPLOYED_INDEX_NAME,    query_field="text_field",    vector_query_field="vector_query_field.predicted_value",    strategy=ElasticsearchStore.ApproxRetrievalStrategy(      query_model_id="sentence-transformers__all-minilm-l6-v2"    ))# Setup a Ingest Pipeline to perform the embedding# of the text fielddb.client.ingest.put_pipeline(    id="test_pipeline",    processors=[        {            "inference": {                "model_id": "sentence-transformers__all-minilm-l6-v2",                "field_map": {"query_field": "text_field"},                "target_field": "vector_query_field",            }        }    ],)# creating a new index with the pipeline,# not relying on
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. ->: will be a combination of approximate semantic search and keyword based search. It will use rrf (Reciprocal Rank Fusion) to balance the two scores from different retrieval methods.Note RRF requires Elasticsearch 8.9.0 or above.{    "knn": {        "field": "vector",        "filter": [],        "k": 1,        "num_candidates": 50,        "query_vector": [1.0, ..., 0.0],    },    "query": {        "bool": {            "filter": [],            "must": [{"match": {"text": {"query": "foo"}}}],        }    },    "rank": {"rrf": {}},}Example: Approx with Embedding Model in Elasticsearch‚ÄãThis example will show how to configure ElasticsearchStore to use the embedding model deployed in Elasticsearch for approximate retrieval. To use this, specify the model_id in ElasticsearchStore ApproxRetrievalStrategy constructor via the query_model_id argument.NOTE This requires the model to be deployed and running in Elasticsearch ml node. See notebook example on how to deploy the model with eland.APPROX_SELF_DEPLOYED_INDEX_NAME = "test-approx-self-deployed"# Note: This does not have an embedding function specified# Instead, we will use the embedding model deployed in Elasticsearchdb = ElasticsearchStore(     es_cloud_id="<your cloud id>",    es_user="elastic",    es_password="<your password>",     index_name=APPROX_SELF_DEPLOYED_INDEX_NAME,    query_field="text_field",    vector_query_field="vector_query_field.predicted_value",    strategy=ElasticsearchStore.ApproxRetrievalStrategy(      query_model_id="sentence-transformers__all-minilm-l6-v2"    ))# Setup a Ingest Pipeline to perform the embedding# of the text fielddb.client.ingest.put_pipeline(    id="test_pipeline",    processors=[        {            "inference": {                "model_id": "sentence-transformers__all-minilm-l6-v2",                "field_map": {"query_field": "text_field"},                "target_field": "vector_query_field",            }        }    ],)# creating a new index with the pipeline,# not relying on