need to provide all of the configuration to the vector store, but
rather just write this yourself.First, let's add a BM25 ranking function to our application:from vespa.package import FieldSetapp_package.schema.add_field_set(FieldSet(name="default", fields=["text"]))app_package.schema.add_rank_profile(RankProfile(name="bm25", first_phase="bm25(text)"))vespa_app = vespa_docker.deploy(application_package=app_package)db = VespaStore.from_documents(docs, embedding_function, app=vespa_app, **vespa_config)Then, to perform a regular text search based on BM25:query = "What did the president say about Ketanji Brown Jackson"custom_query = {    "yql": f"select * from sources * where userQuery()",    "query": query,    "type": "weakAnd",    "ranking": "bm25",    "hits": 4}results  = db.similarity_search_with_score(query, custom_query=custom_query)# results[0][0].metadata["id"] == "id:testapp:testapp::32"# results[0][1] ~= 14.384All of the powerful search and query capabilities of Vespa can be used
by using a custom query. Please refer to the Vespa documentation on it's
Query API for more details.Hybrid search‚ÄãHybrid search means using both a classic term-based search such as
BM25 and a vector search and combining the results. We need to create
a new rank profile for hybrid search on Vespa:app_package.schema.add_rank_profile(    RankProfile(name="hybrid",                first_phase="log(bm25(text)) + 0.5 * closeness(field, embedding)",                inputs=[("query(query_embedding)", "tensor<float>(x[384])")]                ))vespa_app = vespa_docker.deploy(application_package=app_package)db = VespaStore.from_documents(docs, embedding_function, app=vespa_app, **vespa_config)Here, we score each document as a combination of it's BM25 score and its
Vespa is a fully featured search engine and vector database. It supports vector search (ANN), lexical search, and search in structured data, all in the same query.
Vespa is a fully featured search engine and vector database. It supports vector search (ANN), lexical search, and search in structured data, all in the same query. ->: need to provide all of the configuration to the vector store, but
rather just write this yourself.First, let's add a BM25 ranking function to our application:from vespa.package import FieldSetapp_package.schema.add_field_set(FieldSet(name="default", fields=["text"]))app_package.schema.add_rank_profile(RankProfile(name="bm25", first_phase="bm25(text)"))vespa_app = vespa_docker.deploy(application_package=app_package)db = VespaStore.from_documents(docs, embedding_function, app=vespa_app, **vespa_config)Then, to perform a regular text search based on BM25:query = "What did the president say about Ketanji Brown Jackson"custom_query = {    "yql": f"select * from sources * where userQuery()",    "query": query,    "type": "weakAnd",    "ranking": "bm25",    "hits": 4}results  = db.similarity_search_with_score(query, custom_query=custom_query)# results[0][0].metadata["id"] == "id:testapp:testapp::32"# results[0][1] ~= 14.384All of the powerful search and query capabilities of Vespa can be used
by using a custom query. Please refer to the Vespa documentation on it's
Query API for more details.Hybrid search‚ÄãHybrid search means using both a classic term-based search such as
BM25 and a vector search and combining the results. We need to create
a new rank profile for hybrid search on Vespa:app_package.schema.add_rank_profile(    RankProfile(name="hybrid",                first_phase="log(bm25(text)) + 0.5 * closeness(field, embedding)",                inputs=[("query(query_embedding)", "tensor<float>(x[384])")]                ))vespa_app = vespa_docker.deploy(application_package=app_package)db = VespaStore.from_documents(docs, embedding_function, app=vespa_app, **vespa_config)Here, we score each document as a combination of it's BM25 score and its