Last active
June 20, 2019 15:01
-
-
Save sohangp/ebaf716e4af9cf634883f06a273a44d3 to your computer and use it in GitHub Desktop.
Insert all the 9 Children
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Insert Children for Darren | |
curl -X PUT \ | |
'http://localhost:9200/family_tree/_bulk?routing=Darren' -H 'content-type: application/json' \ | |
-d ' | |
{"index": {"_type": "_doc", "_id": "4"}} | |
{"firstName":"Otis", "lastName":"Ford", "gender":"Male", "isAlive":false, "relation_type":{ "name":"child", "parent":"1" } } | |
{"index": {"_type": "_doc", "_id": "5"}} | |
{"firstName":"Pearl", "lastName":"Ford", "gender":"Female", "isAlive":true, "relation_type": { "name":"child", "parent":"1" } } | |
{"index": {"_type": "_doc", "_id": "6"}} | |
{"firstName":"Ava", "lastName":"Ford", "gender":"Female", "isAlive":true, "relation_type": { "name":"child", "parent":"1" } } | |
{"index": {"_type": "_doc", "_id": "7"}} | |
{"firstName":"Tyler", "lastName":"Ford", "gender":"Male", "isAlive":true, "relation_type": { "name":"child", "parent":"1" } } | |
{"index": {"_type": "_doc", "_id": "8"}} | |
{"firstName":"Xavier", "lastName":"Ford", "gender":"Male", "isAlive":true, "relation_type": { "name":"child", "parent":"1" } } | |
' | |
# Insert Children for Sienna | |
curl -X PUT \ | |
'http://localhost:9200/family_tree/_bulk?routing=Sienna' -H 'content-type: application/json' \ | |
-d ' | |
{"index": {"_type": "_doc", "_id": "9"}} | |
{"firstName":"Ralph", "lastName":"Evans", "gender":"Male", "isAlive":true, "relation_type":{ "name":"child", "parent":"2" } } | |
' | |
# Insert Children for Ryan | |
curl -X PUT 'http://localhost:9200/family_tree/_bulk?routing=Ryan' -H 'content-type: application/json' \ | |
-d ' | |
{"index": {"_type": "_doc", "_id": "10"}} | |
{"firstName":"Fred", "lastName":"Turner", "gender":"Male", "isAlive":true, "relation_type":{ "name":"child", "parent":"3" } } | |
{"index": {"_type": "_doc", "_id": "11"}} | |
{"firstName":"Scarlet", "lastName":"Turner", "gender":"Female", "isAlive":false, "relation_type":{ "name":"child", "parent":"3" } } | |
{"index": {"_type": "_doc", "_id": "12"}} | |
{"firstName":"Wayne", "lastName":"Turner", "gender":"Male", "isAlive":true, "relation_type":{ "name":"child", "parent":"3" } } | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment