Skip to content

Commit c40ce93

Browse files
Integration test for hybrid query with named vectors
1 parent c5ccdaf commit c40ce93

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/graphql/journey.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,6 +2243,22 @@ describe('named vectors test', () => {
22432243
});
22442244
});
22452245

2246+
it('should perform a hybrid query on the rating vector', () => {
2247+
return client.graphql
2248+
.get()
2249+
.withClassName(className)
2250+
.withHybrid({
2251+
query: 'Best',
2252+
targetVectors: ['rating'],
2253+
})
2254+
.withFields('rating')
2255+
.do()
2256+
.then((res) => {
2257+
expect(res.data.Get.NamedVectorTest).toHaveLength(3);
2258+
expect(res.data.Get.NamedVectorTest[0].rating).toBe('Best');
2259+
});
2260+
});
2261+
22462262
describe('destroy', () => {
22472263
it('tears down NamedVectorTest class', () => {
22482264
return client.schema.classDeleter().withClassName(className).do();

0 commit comments

Comments
 (0)