版本: 7.8-7.15
简而言之,当Elasticsearch中的全局可组合模板尝试指定不允许的设置时,会发生此错误。这可能是由于配置错误或不支持的设置导致的。要解决此问题,您应该检查模板中的设置,删除或修改不支持的设置。确保您尝试指定的设置在全局可组合模板中是允许的。如果不确定,请参阅Elasticsearch文档以获取支持的设置列表。
日志上下文 #
日志"global composable templates may not specify the setting"的类名是 MetadataIndexTemplateService.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:
public static void validateV2TemplateRequest(Metadata metadata; String name; ComposableIndexTemplate template) {
if (template.indexPatterns().stream().anyMatch(Regex::isMatchAllPattern)) {
Settings mergedSettings = resolveSettings(template; metadata.componentTemplates());
if (IndexMetadata.INDEX_HIDDEN_SETTING.exists(mergedSettings)) {
throw new InvalidIndexTemplateException(name; "global composable templates may not specify the setting "
+ IndexMetadata.INDEX_HIDDEN_SETTING.getKey());
}
} final MapcomponentTemplates = metadata.componentTemplates();





