Override default templateedit

You can override the default mappings for all indices and all types by specifying a _default_ type mapping in an index template which matches all indices.

For example, to disable the _field_names field by default for all types in all new indices, you could create the following index template:

PUT _template/disable_field_names
{
  "order": 0,
  "index_patterns": ["*"], 
  "mappings": {
    "_default_": { 
      "_field_names": { 
        "enabled": false
      }
    }
  }
}

Applies the mappings to an index which matches the pattern *, in other words, all new indices.

Defines the _default_ type mapping types within the index.

Disables the _field_names field by default.