Created
July 12, 2016 15:49
-
-
Save teodanciu/65863572a7d2c19a77e26db30a6e7ab3 to your computer and use it in GitHub Desktop.
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
# Get aliases | |
GET http://:esHost/_aliases | |
# { | |
# "filter": { "terms": { "postId": ["dGfbX_4XQ5aq34X_PY8OTA"] } } | |
# } | |
# Create the posts index | |
PUT http://:esHost/posts-0003 | |
# Create an alias for the posts index | |
POST http://:esHost/_aliases | |
{ | |
"actions": [ | |
{ "remove": { "index": "posts-0002", "alias": "posts" } }, | |
{ "add": { "index": "posts-0003", "alias": "posts" } } | |
] | |
} | |
# Re-index posts | |
POST http://:esHost/_reindex | |
{ | |
"source": { "index": "posts-0001" }, | |
"dest": { "index": "posts-0002" } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment