Skip to content

Instantly share code, notes, and snippets.

@nl5887
Created September 10, 2018 14:17
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 nl5887/d994f61adf9b052d48ad3f0c16c5b130 to your computer and use it in GitHub Desktop.
Save nl5887/d994f61adf9b052d48ad3f0c16c5b130 to your computer and use it in GitHub Desktop.
import record based json into elasticsearch
cat json3 | jq -c '{ "index": {"_index": "bang", "_type": "file"}}, . + { "firmware": "json3" }' | curl -s -H "Content-Type: application/json" -XPUT "http://127.0.0.1:9200/_bulk" --data-binary @-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment