Global composable templates may not specify the setting – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.8-7.15

Briefly, this error occurs when a global composable template in Elasticsearch tries to specify a setting that is not allowed. This could be due to a misconfiguration or an unsupported setting. To resolve this issue, you should review the settings in your template and remove or modify the unsupported ones. Ensure that the settings you’re trying to specify are allowed in global composable templates. If you’re unsure, refer to the Elasticsearch documentation for a list of supported settings.

This guide will help you check for common problems that cause the log ” global composable templates may not specify the setting ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: metadata, cluster.

Log Context

Log “global composable templates may not specify the setting” class name is MetadataIndexTemplateService.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 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 Map componentTemplates = metadata.componentTemplates();

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?