Skip to content

Instantly share code, notes, and snippets.

@fnzv
Created March 28, 2018 09:31
Show Gist options
  • Save fnzv/bb1b6e432cefe0185a94e7ae01bb13d4 to your computer and use it in GitHub Desktop.
Save fnzv/bb1b6e432cefe0185a94e7ae01bb13d4 to your computer and use it in GitHub Desktop.
Generate random data on elasticsearch
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 | xargs -L1 -I {} curl -XPUT -H 'Content-Type: application/json' 'http://localhost:9201/twitter/tweet/{}' -d '{
"user" : "{}",
"post_date" : "2009-11-15T14:12:12",
"message" : "trying out Elastic {}"
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment