版本: 7.9-7.15
简而言之,当索引模板指定了 Elasticsearch 中不存在的组件模板时,就会出现此错误。这可能是由于组件模板名称拼写错误或组件模板已被删除。要解决此问题,您可以创建缺失的组件模板或更正索引模板中的组件模板名称。此外,请确保在使用组件模板的索引模板之前先创建这些组件模板。
日志上下文 #
日志 “index template [” + name + “] specifies component templates " 类名称是 MetadataIndexTemplateService.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:
final ListmissingComponentTemplates = template.composedOf().stream()
.filter(componentTemplate -> componentTemplates.containsKey(componentTemplate) == false)
.collect(Collectors.toList()); if (missingComponentTemplates.size() > 0) {
throw new InvalidIndexTemplateException(name; "index template [" + name + "] specifies component templates " +
missingComponentTemplates + " that do not exist");
}
} public ClusterState addIndexTemplateV2(final ClusterState currentState; final boolean create;





