Last active
August 29, 2015 14:17
-
-
Save dabit/cb383525e7a8e220d0b8 to your computer and use it in GitHub Desktop.
Elasticsearch quick reindex post
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
curl -XPOST 'http://localhost:9200/_aliases' -d ' | |
{ | |
"actions" : [ | |
{ "add" : { "index" : "articles-1", "alias" : "articles" } } | |
] | |
}' |
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
curl -X PUT "http://localhost:9200/articles-2" |
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
curl -X PUT "http://localhost:9200/articles-1" |
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
elasticdump --input=http://localhost:9200/articles-1 \ | |
--output=http://localhost:9200/articles-2 \ | |
--type=data \ | |
--limit=1000 \ | |
--bulk=true \ | |
--bulk-use-output-index-name |
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
curl -XPOST 'http://localhost:9200/_aliases' -d ' | |
{ | |
"actions" : [ | |
{ "remove" : { "index" : "articles-1", "alias" : "articles" } }, | |
{ "add" : { "index" : "articles-2", "alias" : "articles" } } | |
] | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment