Hybrid search with embedding outside the database

Morning

I have a question related to hybrid search. We are testing weaviate locally and doing the embedding out of the database, and pass it the vector to insert and query data. But, because of this, If I fill query parameter in the following code, it raises an error because the database can´t embed the query so I don´t know how I can pass the “keyword” part to the hybrid search

            results = self.collection.query.hybrid(query=None,# No se puede pasar str pq falla al intentar hacer el embedding en la BD y no está configurado
                                                   vector=vector,
                                                   return_metadata=weaviate.classes.query.MetadataQuery(distance=True,score=True, explain_score=True),
                                                   alpha=alpha,
                                                   limit=top_k)

After reading the forum, I have understood that the sparse vector is obtained inside the database. Is any configuration needed? How could we pass the text for the database to obtain the sparse vector in the hybrid search?

Thanks a lot for your help!

  • Weaviate Server Version:
  • Deployment Method:
  • Multi Node? Number of Running Nodes:
  • Client Language and Version:
  • Multitenancy?:

Any additional Information

hi @LauraZ !!

The hybrid search is a fusion of the keyword search and the vector search.

When you provide the vector parameter, Weaviate will not vectorize the query for you. The query parameter will be used only for the keyword search phase.

If you do not provide the vector parameter, then Weaviate will vectorize it for you, considering you have a working vectorizer configured.

Check here for more information on that:

Let me know if this helps.

Thanks!