# Mappings: use wildcards from field name

**URL:** <https://discuss.elastic.co/t/mappings-use-wildcards-from-field-name/22415>\
**Category:** Elasticsearch\
**Created:** [February 26, 2015, 5:56pm UTC](https://discuss.elastic.co/t/mappings-use-wildcards-from-field-name/22415 "2015-02-26T17:56:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastian\_2](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@sebastian\_2](https://discuss.elastic.co/u/sebastian_2)\
**Post date:** [February 26, 2015, 5:56pm UTC](https://discuss.elastic.co/t/mappings-use-wildcards-from-field-name/22415/1 "2015-02-26T17:56:56Z")

</div>

Hi,

Can I create a mapping and use wildcards in the fields name? For example, I  
want to create a template with the following mapping:

{

"user": {

"dynamic": "false",

"properties": {

"email": { "type":"string" },

"\*\_metadata": {

"type": "object",

"dynamic": "true"

}

}

}

}

Then, the "foo\_metadata", "bar\_metadata", etc fields will be mapped.

Is it possible?

--  
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/6d7d08b8-c2f2-4109-9720-c75f031092a6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6d7d08b8-c2f2-4109-9720-c75f031092a6%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![johtani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johtani/32/44956_2.png) [@johtani](https://discuss.elastic.co/u/johtani)\
**Post date:** [March 18, 2015, 12:19am UTC](https://discuss.elastic.co/t/mappings-use-wildcards-from-field-name/22415/2 "2015-03-18T00:19:04Z")

</div>

Hi,

You try to use “dynamic\_templates” .

> **[Mapping root object type | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-root-object-type.html#_dynamic_templates)**

I hope that those help you out.

* * *

Jun Ohtani  
[johtani@gmail.com](mailto:johtani@gmail.com)  
blog : [http://blog.johtani.info](http://blog.johtani.info)  
twitter : [http://twitter.com/johtani](http://twitter.com/johtani)

> 2015/02/27 2:56、sebastian [sebastianos@gmail.com](mailto:sebastianos@gmail.com) のメール：
> 
> Hi,
> 
> Can I create a mapping and use wildcards in the fields name? For example, I want to create a template with the following mapping:
> 
> {  
> "user": {  
> "dynamic": "false",  
> "properties": {  
> "email": { "type":"string" },  
> "\*\_metadata": {  
> "type": "object",  
> "dynamic": "true"  
> }  
> }  
> }  
> }
> 
> Then, the "foo\_metadata", "bar\_metadata", etc fields will be mapped.
> 
> Is it possible?
> 
> --  
> 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/6d7d08b8-c2f2-4109-9720-c75f031092a6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6d7d08b8-c2f2-4109-9720-c75f031092a6%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/772DDFF6-B4D6-4BFD-BAE8-8BDA63BB78C6%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/772DDFF6-B4D6-4BFD-BAE8-8BDA63BB78C6%40gmail.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, 12:26am UTC](https://discuss.elastic.co/t/mappings-use-wildcards-from-field-name/22415/3 "2017-07-06T00:26:03Z")

</div>


