Last active
June 20, 2019 14:38
-
-
Save sohangp/08019794339de5a7f8df4f28b498edcd to your computer and use it in GitHub Desktop.
Create Game Of Thrones Index
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
curl -X PUT 'http://localhost:9200/family_tree' -H 'content-type: application/json' \ | |
-d '{ | |
"settings": { | |
"index": { | |
"number_of_shards": 2, | |
"number_of_replicas": 2 | |
} | |
}, | |
"mappings": { | |
"properties": { | |
"firstName": { | |
"type": "text" | |
}, | |
"lastName": { | |
"type": "text" | |
}, | |
"gender": { | |
"type": "text" | |
}, | |
"isAlive": { | |
"type": "boolean" | |
}, | |
"relation_type": { | |
"type": "join", | |
"eager_global_ordinals": true, | |
"relations": { | |
"parent": "child" | |
} | |
} | |
} | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment