Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.admin().indices().prepareAliases()
- .addAlias(info.newWorking, WORKING_READ_ALIAS)
- .removeAlias(info.oldWorking, WORKING_READ_ALIAS)
- .addAlias(info.newLive, LIVE_READ_ALIAS)
- .removeAlias(info.oldLive, LIVE_READ_ALIAS)
- // write aliases should point to the new index now only
- // need to delete aliases ref to old index
- .removeAlias(info.oldWorking, WORKING_WRITE_ALIAS)
- .removeAlias(info.oldLive, LIVE_WRITE_ALIAS)
- .execute().actionGet(defaultTimeout);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement