Skip to content

Instantly share code, notes, and snippets.

@johtani
Created January 28, 2017 05:33
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 johtani/49911186cd21a69d98ab5572766e0c73 to your computer and use it in GitHub Desktop.
Save johtani/49911186cd21a69d98ab5572766e0c73 to your computer and use it in GitHub Desktop.
POST _reindex
{
"source": {
"index": "apache_elk_example_org"
},
"dest": {
"index": "apache_elk_example"
},
"script": {
"inline": "Random rdm = new Random();ctx._source['@timestamp'] = params.dates[rdm.nextInt(params.dates.length)]+ ctx._source['@timestamp'].substring(10);",
"lang": "painless",
"params": {
"dates": ["2017-01-27", "2017-01-28"]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment