Quantcast
Channel: Weaviate Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 3588

[Question] Query weaviate

$
0
0

Hey Johann :hugs:

I think there might be several things mixing up here.
First issue could be, that you are using query on the client but in all the examples I have seen it is being used on the collection.
So I assume something like the following probably works better :

const collection = client.collections.get(‘MyCoolCollectionName’);
const searchRespose=await collection.query(query);

I looked this up here: Search patterns and basics | Weaviate or Migrate from v2 to v3 | Weaviate

also it kind of looks like there is some mixing syntax of our old v2 TypeScript client with the v3 TypeScript client.
It looks like import weaviate from ‘weaviate-client' is using the new v3 package, whereas the way you are viewing the existing object is rather the old syntax. (SearchResponse?.data?…. )
You can inspect the returned object like this: Migrate from v2 to v3 | Weaviate
Where response.objects[0].properties will return the first object’s properties.

I hope this helps you :green_heart:


Viewing all articles
Browse latest Browse all 3588

Trending Articles