# Defining index mappings on ElasticSearch

**URL:** <https://discuss.elastic.co/t/defining-index-mappings-on-elasticsearch/248774>\
**Category:** Elasticsearch\
**Tags:** docker, language-clients\
**Created:** [September 16, 2020, 6:50am UTC](https://discuss.elastic.co/t/defining-index-mappings-on-elasticsearch/248774 "2020-09-16T06:50:41Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![szanin](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@szanin](https://discuss.elastic.co/u/szanin)\
**Post date:** [September 21, 2020, 1:00am UTC](https://discuss.elastic.co/t/defining-index-mappings-on-elasticsearch/248774/4 "2020-09-21T01:00:57Z")

</div>

I still have to solve how to ensure that only new indices get my template, and not the metrics or logs indices. If I define the "index\_pattern" to be "\*" that will apply to all new indices. Is there a way to specify that I don't want to apply the template to indices starting with "."?

The examples for index\_pattern are not very helpful, somehow we expect indices that share the same template to start with the same letter, like "t\*" etc. In my use case I have a list of more than 30 types of products that I want to share the same settings, and I don't want to add every product type to the index\_pattern list. On top of that, I want to be able to use the same template for all the new products that might be added in the future, since I know that my ES cluster will always contain objects that belong to that category. Is there a way to achieve this, without changing the index name of all products?

So far the only solution I've found is to prepend a string to the index names so that I have them be like "q-abc", "q-xyz" etc. The index pattern matching seems to only allow for wildcard matching, is there a plan to implement something like RegEx or more advanced pattern matching solutions?

@Russ_Cam

---

_[View the full topic](https://discuss.elastic.co/t/defining-index-mappings-on-elasticsearch/248774)._
