fix check reindex status
@@ -309,10 +309,11 @@ public class AdminMaintenanceAction extends FessAdminAction {
if (searchEngineClient.createIndex(docIndex, toIndex, numberOfShards, autoExpandReplicas, resetDictionaries)) {
searchEngineClient.admin().cluster().prepareHealth(toIndex).setWaitForYellowStatus().execute(ActionListener.wrap(response -> {
searchEngineClient.addMapping(docIndex, "doc", toIndex);
- searchEngineClient.reindex(fromIndex, toIndex, replaceAliases);
+ 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)));
return true;
}
