# Dynamic template match precendece

**URL:** <https://discuss.elastic.co/t/dynamic-template-match-precendece/17448>\
**Category:** Elasticsearch\
**Created:** [May 11, 2014, 1:25pm UTC](https://discuss.elastic.co/t/dynamic-template-match-precendece/17448 "2014-05-11T13:25:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidski](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidski/32/44884_2.png) [@davidski](https://discuss.elastic.co/u/davidski)\
**Post date:** [May 11, 2014, 1:25pm UTC](https://discuss.elastic.co/t/dynamic-template-match-precendece/17448/1 "2014-05-11T13:25:39Z")

</div>

I'm a LS 1.4.0 / ES 1.1.1 user and I seem to be hitting some precedence  
problems with my custom ES template -  
[https://gist.github.com/davidski/84fb9e2b32c111bfd2d5](https://gist.github.com/davidski/84fb9e2b32c111bfd2d5). My Elasticsearch  
logs are full of errors about my src\_geoip field not being a fully  
qualified IP address, which suggests that the wildcard "\*ip" dynamic match  
is taking precedence over the specific "src\_geoip" field later in the file.  
Is the interaction between multiple matches a defined case in ES? Since I  
want specific definitions to always be honored over wildcard matches,  
should these more specific matches be placed first in the template file in  
order to take effect?

Thanks for the help!

David

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/bae909fb-fe3a-4e10-bd1a-a9f42c418fdf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bae909fb-fe3a-4e10-bd1a-a9f42c418fdf%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:30am UTC](https://discuss.elastic.co/t/dynamic-template-match-precendece/17448/2 "2017-07-06T01:30:17Z")

</div>

Closed on July 6, 2017, 1:30am UTC


