Skip to content

When using the new .add method, unable to provide collection config #598

Answered by joein
bnkc asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @bnkc

With pure qdrant-client API (without fastembed mixin's methods like add and query), you can have unnamed vectors, which means that you don't need to provide a name.

However, fastembed creates named vectors and operates with them. Names of the vectors are generated from the chosen model names.
Thus, to do search, you need to set query_vector to a some named vector, e.g.:

models.NamedVector(
    name=client.get_vector_field_name(), vector=query_vector
)

If collection was not created, then the first call to add creates it.
If you want to create it on your own, take a look at get_fastembed_vector_params method

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by joein
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #595 on April 16, 2024 13:58.