fix #2531 check reindex status
This commit is contained in:
parent
695d35aa76
commit
81f144c75f
1 changed files with 4 additions and 3 deletions
|
@ -309,9 +309,10 @@ 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 (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)));
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue