IndexDeployError deployError = new IndexDeployError(indexMD.getName(), ErrorType.SHARDS_NOT_DEPLOYABLE);
for (OperationResult operationResult : results) {
if (operationResult != null) {// node-crashed produces null
DeployResult deployResult = (DeployResult) operationResult;
for (Entry<String, Exception> entry : deployResult.getShardExceptions().entrySet()) {
deployError.addShardError(entry.getKey(), entry.getValue());
}
}
}
indexMD.setDeployError(deployError);
}