From 8fb9b2ce94781ebe23c1bd4f5e8f5ea3f2ddda9f Mon Sep 17 00:00:00 2001 From: Mingron <41795715+1autodidact@users.noreply.github.com> Date: Sun, 21 Apr 2024 10:27:54 +0800 Subject: [PATCH] Fix retrieving data in Join-Type implementation --- .../antora/modules/ROOT/pages/elasticsearch/join-types.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/elasticsearch/join-types.adoc b/src/main/antora/modules/ROOT/pages/elasticsearch/join-types.adoc index c97dd46c6..a1bc3df19 100644 --- a/src/main/antora/modules/ROOT/pages/elasticsearch/join-types.adoc +++ b/src/main/antora/modules/ROOT/pages/elasticsearch/join-types.adoc @@ -52,7 +52,7 @@ public class Statement { return routing; } - public void setRouting(Routing routing) { + public void setRouting(String routing) { this.routing = routing; } @@ -199,7 +199,7 @@ void init() { repository.save( Statement.builder() .withText("+1 for the sun") - ,withRouting(savedWeather.getId()) + .withRouting(savedWeather.getId()) .withRelation(new JoinField<>("vote", sunnyAnswer.getId())) <5> .build()); } @@ -226,6 +226,7 @@ SearchHits hasVotes() { Query query = NativeQuery.builder() .withQuery(co.elastic.clients.elasticsearch._types.query_dsl.Query.of(qb -> qb .hasChild(hc -> hc + .type("answer") .queryName("vote") .query(matchAllQueryAsQuery()) .scoreMode(ChildScoreMode.None)