# 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:** 6

<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, 3:32am UTC](https://discuss.elastic.co/t/defining-index-mappings-on-elasticsearch/248774/6 "2020-09-21T03:32:18Z")

</div>

Thanks so much for your reply!

Your suggestion to use:  
`client.LowLevel.Indices.PutTemplateForAll<PutIndexTemplateResponse>("product_template", json);`  
seems a lot better, to be honest I couldn't find any reference to this method in the .NET client after version 1.x, maybe the docs could be updated to make it more clear?

Regarding the pattern matching issue, I don't think the order would solve it because it would still be applied to all indices, and that causes a fatal error when spinning up Kibana because the index mappings for the metrics/logs indices are misconfigured.

I'll follow @warkolm's advice [here](https://discuss.elastic.co/t/template-index-pattern-matching/249289/2) and open a feature request for a "not match" index pattern matching.

---

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