版本: 7.8-8.9
简而言之,当 Elasticsearch 无法在给定仓库中定位到指定索引时,就会发生此错误。这可能是由于索引被删除、重命名,或者根本不存在。要解决此问题,你可以验证索引名称和仓库名称是否存在拼写错误或大小写敏感问题。如果索引已被删除,你可能需要从备份中恢复它。如果索引从未存在过,你应该在继续操作之前先创建它。
日志上下文 #
日志 “index [” + indexName + “] not found in repository [” + repoName + “]” 的类名是 TransportMountSearchableSnapshotAction.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入了解上下文的人参考:
final ListenableFuturerepositoryDataListener = new ListenableFuture<>();
repository.getRepositoryData(repositoryDataListener);
repositoryDataListener.addListener(ActionListener.wrap(repoData -> {
final MapindexIds = repoData.getIndices();
if (indexIds.containsKey(indexName) == false) {
throw new IndexNotFoundException("index [" + indexName + "] not found in repository [" + repoName + "]");
}
final IndexId indexId = indexIds.get(indexName); final OptionalmatchingSnapshotId = repoData.getSnapshotIds()
.stream()





