Advertisement
Guest User

Untitled

a guest
Jan 24th, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. client.admin().indices().prepareAliases()
  2. .addAlias(info.newWorking, WORKING_READ_ALIAS)
  3. .removeAlias(info.oldWorking, WORKING_READ_ALIAS)
  4. .addAlias(info.newLive, LIVE_READ_ALIAS)
  5. .removeAlias(info.oldLive, LIVE_READ_ALIAS)
  6. // write aliases should point to the new index now only
  7. // need to delete aliases ref to old index
  8. .removeAlias(info.oldWorking, WORKING_WRITE_ALIAS)
  9. .removeAlias(info.oldLive, LIVE_WRITE_ALIAS)
  10. .execute().actionGet(defaultTimeout);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement