问题
I made some query like below.
"query" : {
"nested" : {
"path" : "comments.votes",
"query" : { ... },
"inner_hits" : {}
}
}
and I convert it as java api
QueryBuilders.boolQuery().must(
boolQuery
)
.must( // error here if i changed as '.innerHit()'
QueryBuilders.nestedQuery("comments.votes",
QueryBuilders.boolQuery().must( ... )
)
.innerHit( new QueryInnerHitBuilder()) // error here
)
It's how I made java code on ES version 2.x. Since I changed ES version 5.x, It's not functional at all. How should I changed it as ES 5.x version code?
来源:https://stackoverflow.com/questions/42103028/elastic-search-java-api-for-inner-hit