mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-07-05 18:22:23 +00:00
Fix retrieving data in Join-Type implementation.
Original Pull request #2900 Closes #2901
This commit is contained in:
parent
a16782ec73
commit
106b513d11
@ -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<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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user