Skip to content

Instantly share code, notes, and snippets.

@jalberto
Created August 30, 2018 13:29
Show Gist options
  • Save jalberto/8f756a7c4e2a32a6aed296bc8e570e3a to your computer and use it in GitHub Desktop.
Save jalberto/8f756a7c4e2a32a6aed296bc8e570e3a to your computer and use it in GitHub Desktop.
Elasticsearch Reindex example
#!/bin/bash
SRC="http://foo:9200"
DST="http://localhost:9200"
curl -X POST "$DST/_reindex?pretty" -H 'Content-Type: application/json' -d'
{
"source": {
"remote": {
"host": "http://foo:9200"
},
"index": "foo",
"type": "foo",
"size": 500,
"_source": true
},
"dest": {
"index": "foo",
"type": "_doc",
"version_type": "external"
}
}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment