版本: 7.3-8.9
简而言之,当Elasticsearch尝试对已删除或关闭的源索引执行操作时,会发生此错误。这可能是由于配置错误或意外删除导致的。要解决此问题,您可以使用"打开索引"API重新打开已关闭的索引,或者重新创建已删除的索引。确保索引已正确配置并受到保护,以防止将来发生意外删除或关闭。此外,定期监控Elasticsearch集群以尽早发现任何异常。
日志上下文 #
日志"Source indices have been deleted or closed.“的类名是 AbstractCompositeAggFunction.java。 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入背景的人参考:
ActionListener.wrap(r -> {
try {
final Aggregations aggregations = r.getAggregations();
if (aggregations == null) {
listener.onFailure(
new ElasticsearchStatusException("Source indices have been deleted or closed."; RestStatus.BAD_REQUEST)
);
return;
}
final CompositeAggregation agg = aggregations.get(COMPOSITE_AGGREGATION_NAME);
if (agg == null || agg.getBuckets().isEmpty()) {





