Skip to content

Instantly share code, notes, and snippets.

@quoeamaster
Created December 8, 2019 04:31
Show Gist options
  • Select an option

  • Save quoeamaster/c940e0a6a654a39b4a61e2a05001ba59 to your computer and use it in GitHub Desktop.

Select an option

Save quoeamaster/c940e0a6a654a39b4a61e2a05001ba59 to your computer and use it in GitHub Desktop.
# mapping (tbl_books)
PUT blog_enrich_books
{
"mappings": {
"properties": {
"pub_id": {
"type": "keyword"
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"pages": {
"type": "short"
},
"lang": {
"type": "keyword"
},
"isbn": {
"type": "keyword"
},
"type": {
"type": "keyword"
}
}
}
}
# bulk ingestion
POST blog_enrich_books/_bulk
{"index":{}}
{"name":"Hands-On System Programming with Go: Build modern and concurrent applications for Unix and Linux systems using Golang","pub_id":"pub_001","pages":458,"lang":"English","isbn":"1789804078","type":"paperback"}
{"index":{}}
{"name":"Go in 24 Hours, Sams Teach Yourself: Next Generation Systems Programming with Golang","pub_id":"pub_002","pages":368,"lang":"English","isbn":"0672338033","type":"paperback"}
{"index":{}}
{"name":"Go in Action","pub_id":"pub_003","pages":260,"lang":"English","isbn":"1617291781","type":"paperback"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment