Skip to content

Commit 106b513

Browse files
authored
Fix retrieving data in Join-Type implementation.
Original Pull request #2900 Closes #2901
1 parent a16782e commit 106b513

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/antora/modules/ROOT/pages/elasticsearch/join-types.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class Statement {
5252
return routing;
5353
}
5454
55-
public void setRouting(Routing routing) {
55+
public void setRouting(String routing) {
5656
this.routing = routing;
5757
}
5858
@@ -199,7 +199,7 @@ void init() {
199199
repository.save(
200200
Statement.builder()
201201
.withText("+1 for the sun")
202-
,withRouting(savedWeather.getId())
202+
.withRouting(savedWeather.getId())
203203
.withRelation(new JoinField<>("vote", sunnyAnswer.getId())) <5>
204204
.build());
205205
}
@@ -226,6 +226,7 @@ SearchHits<Statement> hasVotes() {
226226
Query query = NativeQuery.builder()
227227
.withQuery(co.elastic.clients.elasticsearch._types.query_dsl.Query.of(qb -> qb
228228
.hasChild(hc -> hc
229+
.type("answer")
229230
.queryName("vote")
230231
.query(matchAllQueryAsQuery())
231232
.scoreMode(ChildScoreMode.None)

0 commit comments

Comments
 (0)