title: Proper way to create index template that is applied to all in ElasticSearch
body: <p>I'm still new to the ElasticSearch technology and right now struggle with creating index template that will be applied to all new indices but can't create proper one.</p>
  <p>Currently  running ElasticSearch 7.9.2 and it's documentation <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.9/indices-put-template.html" rel="nofollow noreferrer">index templates</a> informs that <code>index_patterns</code> field is required and should be array of wildcards (<code>*</code> matches any string).</p>
  <p>Naturally I have tried using <code>[&quot;*&quot;]</code> as pattern via Kibana's console for request:</p>
  <pre><code>PUT _index_template/template_1
  {
    &quot;index_patterns&quot;: [&quot;*&quot;],
    &quot;priority&quot;: 0
  }
  </code></pre>
  <p>I've got:</p>
  <pre><code>{
    &quot;error&quot; : {
      &quot;root_cause&quot; : [
        {
          &quot;type&quot; : &quot;null_pointer_exception&quot;,
          &quot;reason&quot; : null
        }
      ],
      &quot;type&quot; : &quot;null_pointer_exception&quot;,
      &quot;reason&quot; : null
    },
    &quot;status&quot; : 500
  }
  </code></pre>
  <p>while for request that added empty <code>settings</code>:</p>
  <pre><code>PUT _index_template/template_1
  {
    &quot;index_patterns&quot;: [&quot;*&quot;],
    &quot;template&quot;: {
      &quot;settings&quot;: {
        
      }
    },
    &quot;priority&quot;: 0
  }
  </code></pre>
  <p>I've received:</p>
  <pre><code>#! Deprecation: index template [template_1] has index patterns [*] matching patterns from existing older templates [.monitoring-es,.triggered_watches,.management-beats,.transform-internal-005,.logstash-management,.monitoring-kibana,.kibana-event-log-7.9.2-template,.ml-config,.watch-history-11,.ml-meta,ilm-history,.monitoring-logstash,.ml-state,.slm-history,.ml-inference-000002,.monitoring-beats,.monitoring-alerts-7,.ml-anomalies-,.watches,.ml-notifications-000001,.transform-notifications-000002,.ml-stats] with patterns (.monitoring-es =&gt; [.monitoring-es-7-*],.triggered_watches =&gt; [.triggered_watches*],.management-beats =&gt; [.management-beats],.transform-internal-005 =&gt; [.transform-internal-005],.logstash-management =&gt; [.logstash],.monitoring-kibana =&gt; [.monitoring-kibana-7-*],.kibana-event-log-7.9.2-template =&gt; [.kibana-event-log-7.9.2-*],.ml-config =&gt; [.ml-config],.watch-history-11 =&gt; [.watcher-history-11*],.ml-meta =&gt; [.ml-meta],ilm-history =&gt; [ilm-history-2*],.monitoring-logstash =&gt; [.monitoring-logstash-7-*],.ml-state =&gt; [.ml-state*],.slm-history =&gt; [.slm-history-2*],.ml-inference-000002 =&gt; [.ml-inference-000002],.monitoring-beats =&gt; [.monitoring-beats-7-*],.monitoring-alerts-7 =&gt; [.monitoring-alerts-7],.ml-anomalies- =&gt; [.ml-anomalies-*],.watches =&gt; [.watches*],.ml-notifications-000001 =&gt; [.ml-notifications-000001],.transform-notifications-000002 =&gt; [.transform-notifications-*],.ml-stats =&gt; [.ml-stats-*]); this template [template_1] will take precedence during new index creation
  {
    &quot;acknowledged&quot; : true
  }
  </code></pre>
  <p>Response depends only on existence of empty <code>template.settings</code> it seems like it might be slightly bugged.</p>
  <p>Nevertheless latter approach seems to work however deprecation warning sounds dangerous and discouraging (I've tried setting priority to 0 but to no avail). However <a href="https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-templates.html#multiple-templates" rel="nofollow noreferrer">Documentation of 6.8</a> version sports example of <code>&quot;*&quot;</code>. So such functionality existed not long ago.</p>
  <p>What is the proper way, if there is one, to construct &quot;match all&quot; index template?</p>