# Default mappings for new indexes that match a pattern?

**URL:** <https://discuss.elastic.co/t/default-mappings-for-new-indexes-that-match-a-pattern/21121>\
**Category:** Elasticsearch\
**Created:** [December 6, 2014, 10:27pm UTC](https://discuss.elastic.co/t/default-mappings-for-new-indexes-that-match-a-pattern/21121 "2014-12-06T22:27:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![burtonator](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/burtonator/32/44790_2.png) [@burtonator](https://discuss.elastic.co/u/burtonator)\
**Post date:** [December 6, 2014, 10:27pm UTC](https://discuss.elastic.co/t/default-mappings-for-new-indexes-that-match-a-pattern/21121/1 "2014-12-06T22:27:11Z")

</div>

I'm creating a new index, one per day.

I'd like to set the default mappings used by wildcard.

So this way the first time an index is created , the new mappings are used  
based on the wildcard.

I have some fields which are tokens/URLs that I don't want analyzed.

So what I want to do is create a mapping saying that these aren't analyzed  
and then when a new index is created, the default mapping is applied with  
all my type settings.

Is this possible to do by wildcard? For example, "content\*" or do I have  
to have one per day? One per day wouldn't be super fun.

--  
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/4151b580-3c10-4c4a-a016-14d1c7d66da0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4151b580-3c10-4c4a-a016-14d1c7d66da0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![burtonator](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/burtonator/32/44790_2.png) [@burtonator](https://discuss.elastic.co/u/burtonator)\
**Post date:** [December 7, 2014, 3:01am UTC](https://discuss.elastic.co/t/default-mappings-for-new-indexes-that-match-a-pattern/21121/2 "2014-12-07T03:01:19Z")

</div>

nevermind. Looks like index templates are exactly what I need!

> **[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 Saturday, December 6, 2014 2:27:11 PM UTC-8, Kevin Burton wrote:

> I'm creating a new index, one per day.
> 
> I'd like to set the default mappings used by wildcard.
> 
> So this way the first time an index is created , the new mappings are used  
> based on the wildcard.
> 
> I have some fields which are tokens/URLs that I don't want analyzed.
> 
> So what I want to do is create a mapping saying that these aren't analyzed  
> and then when a new index is created, the default mapping is applied with  
> all my type settings.
> 
> Is this possible to do by wildcard? For example, "content\*" or do I have  
> to have one per day? One per day wouldn't be super fun.

--  
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/5a213c51-0d9f-4795-b80c-dee3289c4ad4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5a213c51-0d9f-4795-b80c-dee3289c4ad4%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, 12:45am UTC](https://discuss.elastic.co/t/default-mappings-for-new-indexes-that-match-a-pattern/21121/3 "2017-07-06T00:45:15Z")

</div>

Closed on July 6, 2017, 12:45am UTC


