#1071 wait for reindex completion

This commit is contained in:
Shinsuke Sugaya 2017-06-04 22:29:40 +09:00
parent bc4d5ac375
commit c57f5bd0ac

View file

@ -210,7 +210,7 @@ public class AdminUpgradeAction extends FessAdminAction {
if (fessEsClient.createIndex(docIndex, "doc", toIndex)) {
fessEsClient.admin().cluster().prepareHealth(toIndex).setWaitForYellowStatus().execute(ActionListener.wrap(response -> {
fessEsClient.addMapping(docIndex, "doc", toIndex);
fessEsClient.reindex(fromIndex, toIndex, false);
fessEsClient.reindex(fromIndex, toIndex, true);
if (!fessEsClient.updateAlias(toIndex)) {
logger.warn("Failed to update aliases for " + fromIndex + " and " + toIndex);
}