Skip to content

Instantly share code, notes, and snippets.

@sohangp
Last active June 20, 2019 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sohangp/08019794339de5a7f8df4f28b498edcd to your computer and use it in GitHub Desktop.
Save sohangp/08019794339de5a7f8df4f28b498edcd to your computer and use it in GitHub Desktop.
Create Game Of Thrones Index
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