You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I’m wondering what is the correct approach for querying the same index using a VectorStore.
For example, assuming I've created an index with DenseVectorStrategy I can query it using the search method, but it'll strictly perform what was defined in the implemented es_query (knn search or hybrid search if specified).
However, I have a couple of scenarios I’d like to address:
How can I query the same index using only BM25 (i.e., without invoking the vector search capabilities)?
Is it possible to perform hybrid searches on the same index but vary the merging strategy (e.g., using RRF or applying different boosting scoring) between searches?
Currently, the only option I’ve found is to instantiate a new VectorStore object for each query configuration. This feels inefficient, and I’m wondering if there’s a better way to handle these types of queries without recreating the VectorStore each time.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi! The VectorStore.search() method allows you to pass a custom_query argument with a callable. Your function will be called with the Elasticsearch query, to give you the option to make changes to it before the query is executed. That should allow you to issue queries that are different than the one that corresponds to the strategy you selected.
Hi!
I’m wondering what is the correct approach for querying the same index using a
VectorStore
.For example, assuming I've created an index with
DenseVectorStrategy
I can query it using thesearch
method, but it'll strictly perform what was defined in the implementedes_query
(knn search or hybrid search if specified).However, I have a couple of scenarios I’d like to address:
Currently, the only option I’ve found is to instantiate a new
VectorStore
object for each query configuration. This feels inefficient, and I’m wondering if there’s a better way to handle these types of queries without recreating theVectorStore
each time.Thanks!
The text was updated successfully, but these errors were encountered: