Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SearchParams to query_by_embedding #35

Open
pandasar13 opened this issue Nov 11, 2023 · 0 comments
Open

Add SearchParams to query_by_embedding #35

pandasar13 opened this issue Nov 11, 2023 · 0 comments

Comments

@pandasar13
Copy link

In qdrant you can pass hnsw_ef to the SearchParams to indicate the ef_search value. However,this feature is not present in qdrant-haystack.

My idea would be to add a parameter to the init in which you could optionally specify the ef_search , and if not specified then it simply uses the same value given to ef_construction.

It could be added to qdrant-haystack in the query_by_embedding function.

points = self.client.search(
            collection_name=index,
            query_vector=cast(list, query_emb.tolist()),
            query_filter=qdrant_filters,
            limit=top_k,
            with_vectors=return_embedding or True,
           
          #parameter to add
           search_params=rest.SearchParams(hnsw_ef=128, exact=False)
        )

Thehnsw_efand exact could be passed to the init as a dictionary. If not given they would default to the qdrant default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant