Java APIを使用してelasticsearchで内部ヒットを実装しようとしていますが、それに関するドキュメントや他の人が使用している例を見つけることができません. 次のように機能する JSON 検索があります。
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"nested": {
"path": "locations",
"filter": {
"geo_distance": {
"distance": "20km",
"locations.address.geoLocation": {
"lat": 38.07061,
"lon": -76.77514
}
}
},
"inner_hits": {}
}
}
}
}
}
Elasticsearch ライブラリに InnerHitsBuilder メソッドと addInnerHit メソッドがありますが、それらの使用方法に関するドキュメントが見つかりません。