": { "ord" /> ": { "ord" /> ": { "ord"/>

Elasticsearch pattern merge/overriding of two index templates

13 Views Asked by At

What I want to do is to enforce best_compression for new indices with logstash-<myname>-* pattern by creating new template

  "logstash-<myname>": {
    "order": 0,
    "index_patterns": [
      "logstash-<myname>-*"
    ],
    "settings": {
      "index": {
        "codec": "best_compression"
      }
    }
  }

while I already have an index template logstash with

  "logstash": {
    "order": 0,
    "version": 60001,
    "index_patterns": [
      "logstash-*"
    ],
    "settings": {
      "index": {
        "number_of_shards": "1",
        "refresh_interval": "5s"
      }
    },
    ...
  }

having no best_compression set.

Is it possible to reuse all the stuff from the existing logstash template and add best_compression to newly created logstash-<myname>-* indices by creating a logstash-<myname> template such as the one above?

Will the settings for newly created logstash-<myname>-* indices be merged by overriding settings.index.codec setting of logstash template by the longer pattern from new logstash-<myname> template?

0

There are 0 best solutions below