# Just Pushed: Dynamic Template Mapping Definitions

**URL:** <https://discuss.elastic.co/t/just-pushed-dynamic-template-mapping-definitions/3394>\
**Category:** Elasticsearch\
**Created:** [October 1, 2010, 2:57pm UTC](https://discuss.elastic.co/t/just-pushed-dynamic-template-mapping-definitions/3394 "2010-10-01T14:57:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [October 1, 2010, 2:57pm UTC](https://discuss.elastic.co/t/just-pushed-dynamic-template-mapping-definitions/3394/1 "2010-10-01T14:57:45Z")

</div>

Hey,

I've heard this feature requested by many users, so here it is:  
[http://github.com/elasticsearch/elasticsearch/issues/issue/397](http://github.com/elasticsearch/elasticsearch/issues/issue/397). Hopefully it  
answers what people were after (for example, the ability to automatically  
define multi\_field mappings based on a pattern or by default).

-shay.banon

---

<div class="post-metadata">

**Author:** ![Eugene\_2](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@Eugene\_2](https://discuss.elastic.co/u/Eugene_2)\
**Post date:** [October 3, 2010, 10:20pm UTC](https://discuss.elastic.co/t/just-pushed-dynamic-template-mapping-definitions/3394/2 "2010-10-03T22:20:51Z")

</div>

Hey Shay,

Thanks for the feature, that's exactly what i needed.

My problem is that i cant get it to work ☹ I need to store all  
dynamic fields by default ("store" : "yes") and the mapping i am  
trying to use is as follows:

{  
"user" : {"dynamic\_templates":[{"match":"\*","mapping":  
{"store":"yes"}}]}  
}

When i later query the \_mapping of the index, all the dynamic fields  
are "store" : "no".

The version I am using is from git: elasticsearch/0.12.0-SNAPSHOT/  
2010-10-03T19:28

On Oct 1, 4:57 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> Hey,
> 
> I've heard this feature requested by many users, so here it is:[Mapper: Dynamic Template Support · Issue #397 · elastic/elasticsearch · GitHub](http://github.com/elasticsearch/elasticsearch/issues/issue/397). Hopefully it  
> answers what people were after (for example, the ability to automatically  
> define multi\_field mappings based on a pattern or by default).
> 
> -shay.banon

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [October 4, 2010, 10:40am UTC](https://discuss.elastic.co/t/just-pushed-dynamic-template-mapping-definitions/3394/3 "2010-10-04T10:40:13Z")

</div>

Hey,

Yea, completely generic mappings is something that I just added support  
for. Also adding the ability to refer to the dynamic type "guessed" based on  
the type introduced for simple generic cross typed multi\_field mappings.  
Updated the issue with an example:  
[Issues · elastic/elasticsearch · GitHub](http://github.com/elasticsearch/elasticsearch/issues/closed#issue/397).

In short, give laster master a go, see if it works.

-shay.banon

On Mon, Oct 4, 2010 at 12:20 AM, Eugene [glum.ua@gmail.com](mailto:glum.ua@gmail.com) wrote:

> Hey Shay,
> 
> Thanks for the feature, that's exactly what i needed.
> 
> My problem is that i cant get it to work ☹ I need to store all  
> dynamic fields by default ("store" : "yes") and the mapping i am  
> trying to use is as follows:
> 
> {  
> "user" : {"dynamic\_templates":[{"match":"\*","mapping":  
> {"store":"yes"}}]}  
> }
> 
> When i later query the \_mapping of the index, all the dynamic fields  
> are "store" : "no".
> 
> The version I am using is from git: elasticsearch/0.12.0-SNAPSHOT/  
> 2010-10-03T19:28
> 
> On Oct 1, 4:57 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> 
> > Hey,
> > 
> > I've heard this feature requested by many users, so here it is:  
> > [Mapper: Dynamic Template Support · Issue #397 · elastic/elasticsearch · GitHub](http://github.com/elasticsearch/elasticsearch/issues/issue/397). Hopefully  
> > it  
> > answers what people were after (for example, the ability to automatically  
> > define multi\_field mappings based on a pattern or by default).
> > 
> > -shay.banon

---

<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, 4:18am UTC](https://discuss.elastic.co/t/just-pushed-dynamic-template-mapping-definitions/3394/4 "2017-07-06T04:18:31Z")

</div>


