Skip to content

Commit

Permalink
Fix retrieving data in Join-Type implementation.
Browse files Browse the repository at this point in the history
Original Pull request spring-projects#2900
Closes spring-projects#2901
  • Loading branch information
1autodidact committed Apr 21, 2024
1 parent a16782e commit 106b513
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class Statement {
return routing;
}
public void setRouting(Routing routing) {
public void setRouting(String routing) {
this.routing = routing;
}
Expand Down Expand Up @@ -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());
}
Expand All @@ -226,6 +226,7 @@ SearchHits<Statement> 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)
Expand Down

0 comments on commit 106b513

Please sign in to comment.