DELETE testindex PUT /testindex { "mappings": { "board": { "_routing": { "required": true }, "properties": { "id": { "type": "text" }, "name": { "type": "text" }, "accountId": { "type": "long" } } }, "post": { "_routing": { "required": true }, "properties": { "id": { "type": "text" }, "postText_en": { "type": "text" }, "accountId": { "type": "long" } }, "_parent": { "type": "board" } }, "comment": { "_routing": { "required": true }, "properties": { "id": { "type": "text" }, "commentText_en": { "type": "text" }, "accountId": { "type": "long" } }, "_parent": { "type": "post" } }, "reply": { "_routing": { "required": true }, "properties": { "id": { "type": "text" }, "replyText_en": { "type": "text" }, "accountId": { "type": "long" } }, "_parent": { "type": "comment" } } } } POST testindex/board/100_board?routing=1000 { "id": "100_board", "name": "sample board", "accountId": 1000 } POST /testindex/post/200_post?routing=1000&parent=100_board { "id": "200_post", "postText_en": "sample post document 200", "accountId": 1000 } POST /testindex/comment/300_comment?routing=1000&parent=200_post { "id": "300_comment", "commentText_en": "sample comment document 300", "accountId": 1000 } POST /testindex/reply/400_reply?routing=1000&parent=300_comment { "id": "400_reply", "replyText_en": "sample reply document 400", "accountId": 1000 } POST /testindex/post/201_post?routing=1000&parent=100_board { "id": "201_post", "postText_en": "sample post document 201", "accountId": 1000 } POST /testindex/comment/301_comment?routing=1000&parent=201_post { "id": "301_comment", "commentText_en": "sample comment 301", "accountId": 1000 } POST /testindex/reply/401_reply?routing=1000&parent=301_comment { "id": "401_reply", "replyText_en": "sample reply document 401", "accountId": 1000 } POST /testindex/post/202_post?routing=1000&parent=100_board { "id": "202_post", "postText_en": "sample post 202", "accountId": 1000 } POST /testindex/comment/302_comment?routing=1000&parent=202_post { "id": "302_comment", "commentText_en": "sample comment document 302", "accountId": 1000 } POST /testindex/reply/402_reply?routing=1000&parent=302_comment { "id": "402_reply", "replyText_en": "sample reply 402", "accountId": 1000 } POST /testindex/post/203_post?routing=1000&parent=100_board { "id": "203_post", "postText_en": "sample post 203", "accountId": 1000 } POST /testindex/comment/303_comment?routing=1000&parent=203_post { "id": "303_comment", "commentText_en": "sample comment document 303", "accountId": 1000 } POST /testindex/reply/403_reply?routing=1000&parent=303_comment { "id": "403_reply", "replyText_en": "sample reply document 403", "accountId": 1000 }