Hi,
I am using the JS/TS client v3 to search a collection with named vectors (text_vector
and image_vector
). I am using CLIP model for my embeddings, so both vectors are 768-dimensional and cross-modal search works as expected in the Weaviate console (GraphQL), where I get different results for different query vectors.
This is my code for Weaviate console:
# Powered by GraphiQL
{
Get {
FashionItem(
limit: 5
nearVector: {
vector: embedding
targetVectors: ["text_vector"]
}
) {
name
description
imageUrl
url
brandId
price
_additional {
distance
}
}
}
}
However, when I run the following code in TypeScript, I always get the same results, regardless of the input vector:
`const queryOptions = {
limit: limit,
offset: offset,
returnProperties: [
"name",
"description",
"imageUrl",
"url",
"brandId",
"price",
],
nearVector: {
text_vector: embedding, //vector of 768 dimension
},
targetVector: ["text_vector"],
};
result = await collection.query.fetchObjects(queryOptions);`
Is there something wrong with my query, or could this be a bug in the client? As I said before, the same search in the console works as expected, but in TypeScript the results do not change with different vectors.
Any help would be appreciated.