Created
August 30, 2018 13:29
-
-
Save jalberto/8f756a7c4e2a32a6aed296bc8e570e3a to your computer and use it in GitHub Desktop.
Elasticsearch Reindex example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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