|
@@ -309,9 +309,10 @@ public class AdminMaintenanceAction extends FessAdminAction {
|
|
if (searchEngineClient.createIndex(docIndex, toIndex, numberOfShards, autoExpandReplicas, resetDictionaries)) {
|
|
if (searchEngineClient.createIndex(docIndex, toIndex, numberOfShards, autoExpandReplicas, resetDictionaries)) {
|
|
searchEngineClient.admin().cluster().prepareHealth(toIndex).setWaitForYellowStatus().execute(ActionListener.wrap(response -> {
|
|
searchEngineClient.admin().cluster().prepareHealth(toIndex).setWaitForYellowStatus().execute(ActionListener.wrap(response -> {
|
|
searchEngineClient.addMapping(docIndex, "doc", toIndex);
|
|
searchEngineClient.addMapping(docIndex, "doc", toIndex);
|
|
- searchEngineClient.reindex(fromIndex, toIndex, replaceAliases);
|
|
|
|
- if (replaceAliases && !searchEngineClient.updateAlias(toIndex)) {
|
|
|
|
- logger.warn("Failed to update aliases for {} and {}", fromIndex, toIndex);
|
|
|
|
|
|
+ if (searchEngineClient.reindex(fromIndex, toIndex, replaceAliases)) {
|
|
|
|
+ if (replaceAliases && !searchEngineClient.updateAlias(toIndex)) {
|
|
|
|
+ logger.warn("Failed to update aliases for {} and {}", fromIndex, toIndex);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}, e -> logger.warn("Failed to reindex from {} to {}", fromIndex, toIndex, e)));
|
|
}, e -> logger.warn("Failed to reindex from {} to {}", fromIndex, toIndex, e)));
|
|
return true;
|
|
return true;
|