# Dynamic indexing and index field type

**URL:** <https://discuss.elastic.co/t/dynamic-indexing-and-index-field-type/22532>\
**Category:** Elasticsearch\
**Created:** [March 5, 2015, 4:30pm UTC](https://discuss.elastic.co/t/dynamic-indexing-and-index-field-type/22532 "2015-03-05T16:30:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![navdeep\_agarwal](https://avatars.discourse-cdn.com/v4/letter/n/c89c15/32.png) [@navdeep\_agarwal](https://discuss.elastic.co/u/navdeep_agarwal)\
**Post date:** [March 5, 2015, 4:30pm UTC](https://discuss.elastic.co/t/dynamic-indexing-and-index-field-type/22532/1 "2015-03-05T16:30:20Z")

</div>

hi we have a use case where we want to create new index every day (so that  
we can leverage deleting older indexes easily) .that said we will be  
indexing using hadoop elasticsearch,where we want to set fields index type  
as non analyzed but indexed as for some fields we want exact match, we  
thought of dynamic template but template is applied on index in our case  
new index is created every day . how can we set field types dynamically  
though hive/pig(any one would suffice) .

i am using latest es

--  
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/8000d383-827b-4c63-b038-2f2135ecaddf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8000d383-827b-4c63-b038-2f2135ecaddf%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![navdeep\_agarwal](https://avatars.discourse-cdn.com/v4/letter/n/c89c15/32.png) [@navdeep\_agarwal](https://discuss.elastic.co/u/navdeep_agarwal)\
**Post date:** [March 23, 2015, 11:44am UTC](https://discuss.elastic.co/t/dynamic-indexing-and-index-field-type/22532/2 "2015-03-23T11:44:52Z")

</div>

well i got the answer from my question ,dynamic mapping is the answer.i am  
using default templates with **default** all enabled.

On Thu, Mar 5, 2015 at 10:00 PM, navdeep agarwal [navdeep710@gmail.com](mailto:navdeep710@gmail.com)  
wrote:

> hi we have a use case where we want to create new index every day (so that  
> we can leverage deleting older indexes easily) .that said we will be  
> indexing using hadoop elasticsearch,where we want to set fields index type  
> as non analyzed but indexed as for some fields we want exact match, we  
> thought of dynamic template but template is applied on index in our case  
> new index is created every day . how can we set field types dynamically  
> though hive/pig(any one would suffice) .
> 
> i am using latest es
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/r-YImNIVeWE/unsubscribe](https://groups.google.com/d/topic/elasticsearch/r-YImNIVeWE/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/8000d383-827b-4c63-b038-2f2135ecaddf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8000d383-827b-4c63-b038-2f2135ecaddf%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/8000d383-827b-4c63-b038-2f2135ecaddf%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8000d383-827b-4c63-b038-2f2135ecaddf%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> 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/CALOF%3DH4X\_fYb1ADr3FzsYtK%3DrnSXoJcVw\_xjaaCSHYV4FTmigg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALOF%3DH4X_fYb1ADr3FzsYtK%3DrnSXoJcVw_xjaaCSHYV4FTmigg%40mail.gmail.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:24am UTC](https://discuss.elastic.co/t/dynamic-indexing-and-index-field-type/22532/3 "2017-07-06T00:24:52Z")

</div>


