版本: 6.8-7.5
简而言之,当 Elasticsearch 尝试恢复部分索引数据但失败时,就会发生此错误,因为索引不存在。这可能是由于配置错误或索引被删除导致的。要解决此问题,您可以重新创建缺失的索引或检查配置以确保指定了正确的索引。此外,确保 Elasticsearch 集群具有访问和恢复索引的必要权限。
日志上下文 #
日志 “cannot restore partial index [” + renamedIndex + “] because such " 的类名是 RestoreService.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:
"with same name already exists in the cluster. Either close or delete the existing index or restore the " +
"index under a different name by providing a rename pattern and replacement name");
}
// Index exist - checking if it's partial restore
if (partial) {
throw new SnapshotRestoreException(snapshot; "cannot restore partial index [" + renamedIndex + "] because such " +
"index already exists");
}
// Make sure that the number of shards is the same. That's the only thing that we cannot change
if (currentIndexMetaData.getNumberOfShards() != snapshotIndexMetaData.getNumberOfShards()) {
throw new SnapshotRestoreException(snapshot;





