# Multiple path\_match within a single dynamic template?

**URL:** https://discuss.elastic.co/t/multiple-path-match-within-a-single-dynamic-template/16236
**Category:** Elasticsearch
**Created:** [March 7, 2014, 7:28pm UTC](https://discuss.elastic.co/t/multiple-path-match-within-a-single-dynamic-template/16236 "2014-03-07T19:28:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hari/32/1582_2.png) [@hari](https://discuss.elastic.co/u/hari)
#### Post date: [March 7, 2014, 7:28pm UTC](https://discuss.elastic.co/t/multiple-path-match-within-a-single-dynamic-template/16236/1 "2014-03-07T19:28:18Z")

</div>

I have a complex JSON where in #text field appears in multiple paths within  
the JSON  
I want to use dynamic template to map some of these fields as float and  
rest will be string based on the path.

path\_match defined within the dynamic template works fine for me, however  
should I be defining one template per path pattern?  
is there a way to provide multiple paths within a single template?

E.g.  
"path\_match" : "DataArea.Order.OrderAmount._.#text"  
"path\_match" : "DataArea.Order.OrderPaymentInfo.Amount._.#text"

--  
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/4a504435-1d11-43fd-a2fc-b8f27f85d448%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4a504435-1d11-43fd-a2fc-b8f27f85d448%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:44am UTC](https://discuss.elastic.co/t/multiple-path-match-within-a-single-dynamic-template/16236/2 "2017-07-06T01:44:48Z")

</div>


