# Default document mapping for new document type

**URL:** <https://discuss.elastic.co/t/default-document-mapping-for-new-document-type/8671>\
**Category:** Elasticsearch\
**Created:** [August 8, 2012, 1:46pm UTC](https://discuss.elastic.co/t/default-document-mapping-for-new-document-type/8671 "2012-08-08T13:46:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcin\_Dojwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_dojwa/32/2307_2.png) [@Marcin\_Dojwa](https://discuss.elastic.co/u/Marcin_Dojwa)\
**Post date:** [August 8, 2012, 1:46pm UTC](https://discuss.elastic.co/t/default-document-mapping-for-new-document-type/8671/1 "2012-08-08T13:46:25Z")

</div>

Hi,

Is it possible to set default document mapping in existing index for newly  
created document types ? I want to have the same document mapping for each  
document type in a single index.

Best regards.  
Marcin Dojwa

---

<div class="post-metadata">

**Author:** ![Radu\_Gheorghe1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe1/32/2688_2.png) [@Radu\_Gheorghe1](https://discuss.elastic.co/u/Radu_Gheorghe1)\
**Post date:** [August 9, 2012, 7:05am UTC](https://discuss.elastic.co/t/default-document-mapping-for-new-document-type/8671/2 "2012-08-09T07:05:54Z")

</div>

Hi Marcin,

Yes, you can use index templates, where you can use wildcards. Take a look  
here:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

On Wednesday, August 8, 2012 3:46:25 PM UTC+2, Marcin Dojwa wrote:

> Hi,
> 
> Is it possible to set default document mapping in existing index for newly  
> created document types ? I want to have the same document mapping for each  
> document type in a single index.
> 
> Best regards.  
> Marcin Dojwa

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [August 9, 2012, 11:40am UTC](https://discuss.elastic.co/t/default-document-mapping-for-new-document-type/8671/3 "2012-08-09T11:40:23Z")

</div>

On Wed, 2012-08-08 at 15:46 +0200, Marcin Dojwa wrote:

> Hi,
> 
> Is it possible to set default document mapping in existing index for  
> newly created document types ? I want to have the same document  
> mapping for each document type in a single index.

You can just map a type _default_ and that will be used for all  
automatically created types in that index

clint

---

<div class="post-metadata">

**Author:** ![Marcin\_Dojwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_dojwa/32/2307_2.png) [@Marcin\_Dojwa](https://discuss.elastic.co/u/Marcin_Dojwa)\
**Post date:** [August 9, 2012, 1:28pm UTC](https://discuss.elastic.co/t/default-document-mapping-for-new-document-type/8671/4 "2012-08-09T13:28:33Z")

</div>

Thank you for the answer.

Best regards.

2012/8/9 Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com)

> On Wed, 2012-08-08 at 15:46 +0200, Marcin Dojwa wrote:
> 
> > Hi,
> > 
> > Is it possible to set default document mapping in existing index for  
> > newly created document types ? I want to have the same document  
> > mapping for each document type in a single index.
> 
> You can just map a type _default_ and that will be used for all  
> automatically created types in that index
> 
> clint

---

<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, 3:16am UTC](https://discuss.elastic.co/t/default-document-mapping-for-new-document-type/8671/5 "2017-07-06T03:16:56Z")

</div>


