Index templates allow you to define templates that will automatically be
applied to new indices created. The templates include both settings and
mappings, and a simple pattern template that controls if the template
will be applied to the index created. For example:

Multiple index templates can potentially match an index, in this case,
both the settings and mappings are merged into the final configuration
of the index. The order of the merging can be controlled using the
order parameter, with lower order being applied first, and higher
orders overriding them. For example:

The above will disable storing the _source on all type1 types, but
for indices of that start with te*, source will still be enabled.
Note, for mappings, the merging is "deep", meaning that specific
object/property based mappings can easily be added/overridden on higher
order templates, with lower order templates providing the basis.