Hybrid search giving errors about missing vectorizer, but objects are vectorized correctly

Description

Using the old typescript sdk to connect /query to WCS, I get an error about vectorizer missing. However, the data upload done beforehand was successful and I can query / render the vectors for each object. Perhaps I am not understanding hybrid settings? Please advise.

Error:

// sample code

  .withHybrid({
    // query: parsed.data.q as string,
    query: "title", <-- one of the class properties
  })

ClientError: get vector input from modules provider: VectorFromInput was called without vectorizer:

Server Setup Information

  • Weaviate Server Version: Latest WCS
  • Deployment Method: WCS
  • Multi Node? Number of Running Nodes: 1
  • Client Language and Version: Typescript

Any additional Information

Should have added using weaviate-ts-client version 2.1.1 and next.js 14.2.1 to do the queries. Oddly they work when I am directly querying the WCS playground and adding the openai header there.

For some reason, headers is not being passed from above;

Here is the client instantiation:

const client: WeaviateClient = weaviate.client({
scheme: “https”,
host: “https://foo-1.us-east1.gcp.weaviate.cloud”,
apiKey: new ApiKey(“foo123131231231”),
headers: {“X-Openai-Api-Key”: “sk-foo3432423423”}
});

Here is the error:

ClientError: get vector input from modules provider: VectorFromInput was called without vectorizer: {“response”:{“data”:{“Get”:{“Foo2”:null}},“errors”:[{“locations”:[{“column”:6,“line”:1}],“message”:“get vector input from modules provider: VectorFromInput was called without vectorizer”,“path”:[“Get”,“Foo2”]}],“status”:200,“headers”:{}},“request”:{“query”:“{Get{Foo2(hybrid:{query:"Developer",alpha:0.5,properties:["title","companyName"],targetVectors:["title","companyName"]},limit:10){postId title companyName created_at}}}”}}

hi @weisisheng !

This is strange.

This seems to be a client message, complaining that you have not passed the vector parameter.

So in a hybrid search, if you pass only a query, it will be used for both the bm25 search, and have it vectorized to do the vector search part.

You can also pass a vector yourself, as described here:

Maybe there is a code before passing a null value as vector parameter?

:thinking:

Adding the vector helped me to get more insights into the issue. Thanks!

1 Like