From 650a2e9728fba54e3aaed6b03b60cd40210cd828 Mon Sep 17 00:00:00 2001 From: dyma solovei Date: Fri, 25 Oct 2024 15:06:33 +0200 Subject: [PATCH] test: fix nearObject with groupBy test --- .../integration/client/graphql/ClientGraphQLTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/java/io/weaviate/integration/client/graphql/ClientGraphQLTest.java b/src/test/java/io/weaviate/integration/client/graphql/ClientGraphQLTest.java index 255c864d..e2b057e4 100644 --- a/src/test/java/io/weaviate/integration/client/graphql/ClientGraphQLTest.java +++ b/src/test/java/io/weaviate/integration/client/graphql/ClientGraphQLTest.java @@ -1602,6 +1602,8 @@ public void testGraphQLGetWithGroupBy() { }).build(); // _additional Field _additional = Field.builder().name("_additional").fields(new Field[]{group}).build(); + // Property that we group by + Field ofDocument = Field.builder().name("ofDocument{__typename}").build(); // filter arguments GroupByArgument groupBy = client.graphQL().arguments().groupByArgBuilder() .path(new String[]{"ofDocument"}).groups(3).objectsPerGroup(10).build(); @@ -1612,7 +1614,8 @@ public void testGraphQLGetWithGroupBy() { .withClassName(testData.PASSAGE) .withNearObject(nearObject) .withGroupBy(groupBy) - .withFields(_additional).run(); + .withFields() + .withFields(ofDocument, _additional).run(); testData.cleanupWeaviate(client); // then assertThat(groupByResult).isNotNull();