Skip to content

Instantly share code, notes, and snippets.

@simonrobb
Last active June 6, 2022 06:47
Show Gist options
  • Save simonrobb/44ecba4f83724f45b8d5f25afeb1f314 to your computer and use it in GitHub Desktop.
Save simonrobb/44ecba4f83724f45b8d5f25afeb1f314 to your computer and use it in GitHub Desktop.
A cURL command to create the Elasticsearch index for Packsmith shipments
curl -X PUT http://localhost:9200/job_pool -H "Content-Type: application/json" -d '{
"mappings": {
"properties": {
"id": {
"type": "keyword"
},
"type": {
"type": "keyword"
},
"payout": {
"type": "integer"
},
"expectedAt": {
"type": "date"
},
"location": {
"type": "geo_point"
},
"variantId": {
"type": "keyword"
},
"quantity": {
"type": "integer"
},
"joinField": {
"type": "join",
"relations": {
"job": "lineItem"
}
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment