0
私は親オブジェクト(ブログ投稿)およびネストされた項目(コメント) 親とネストされたオブジェクトは、両方のは親によってオブジェクトと子供が
だから私の場合、IDをキーとしているがあり、IDS親オブジェクトを取得し、私はすべての子供たちにあまりにも
GET /my_index/blogpost/1
{
"id": 1,
"title": "Nest eggs",
"body": "Making your money work...",
"tags": [ "cash", "shares" ],
"comments": [
{
"id": 2,
"comment": "Great article",
"age": 28,
"stars": 4,
"date": "2014-09-01"
},
{
"id": 4,
"comment": "More like this please",
"age": 31,
"stars": 5,
"date": "2014-10-22"
}
]
}
質問
を取得しますが、私は親と子のIDに基づいて子供のサブセットを取得したいです
私の希望する動作は次のとおりです。
GET /my_index/blogpost/1?onlyGetCommentIds=4
{
"id": 1,
"title": "Nest eggs",
"body": "Making your money work...",
"tags": [ "cash", "shares" ],
"comments": [
{
"id": 4,
"comment": "More like this please",
"age": 31,
"stars": 5,
"date": "2014-10-22"
}
]
}
上記の例では、親オブジェクトとともにコメントID == 4が返されます。
このクエリはどのように構成しますか?達成するためにあなたはnested inner_hits
を使用する必要が
これで運がいいですか? – Val