# Disable date detection for already created type

**URL:** <https://discuss.elastic.co/t/disable-date-detection-for-already-created-type/65174>\
**Category:** Elasticsearch\
**Created:** [November 7, 2016, 6:58am UTC](https://discuss.elastic.co/t/disable-date-detection-for-already-created-type/65174 "2016-11-07T06:58:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![necrolax](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/necrolax/32/136372_2.png) [@necrolax](https://discuss.elastic.co/u/necrolax)\
**Post date:** [November 7, 2016, 6:58am UTC](https://discuss.elastic.co/t/disable-date-detection-for-already-created-type/65174/1 "2016-11-07T06:58:10Z")

</div>

Hi All,

I tried disabling date detection before a type being created dynamically but Is there a way I can disable date detection for already created type?

---

<div class="post-metadata">

**Author:** ![sreeram](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@sreeram](https://discuss.elastic.co/u/sreeram)\
**Post date:** [November 7, 2016, 7:39am UTC](https://discuss.elastic.co/t/disable-date-detection-for-already-created-type/65174/2 "2016-11-07T07:39:05Z")

</div>

No, you can't do that.

---

<div class="post-metadata">

**Author:** ![necrolax](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/necrolax/32/136372_2.png) [@necrolax](https://discuss.elastic.co/u/necrolax)\
**Post date:** [November 7, 2016, 8:16am UTC](https://discuss.elastic.co/t/disable-date-detection-for-already-created-type/65174/3 "2016-11-07T08:16:37Z")

</div>

Thanks for the reply @sreeram. Is there a way i can send date as string in elastic search ?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 7, 2016, 11:25am UTC](https://discuss.elastic.co/t/disable-date-detection-for-already-created-type/65174/4 "2016-11-07T11:25:01Z")

</div>

Just map it as a String in the mapping before indexing the first document.

---

<div class="post-metadata">

**Author:** ![necrolax](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/necrolax/32/136372_2.png) [@necrolax](https://discuss.elastic.co/u/necrolax)\
**Post date:** [November 7, 2016, 11:43am UTC](https://discuss.elastic.co/t/disable-date-detection-for-already-created-type/65174/5 "2016-11-07T11:43:28Z")

</div>

Thanks @dadoonet.

Please find my scenario below. I already have a property value of data type String. When i try to insert date for property value i am getting MergeMappingException. Hence i wanted to disable date.

Please find my mappings below. I have property called parameters which will have reference to it and hence it defines mappings recursively. For exisiting level of depth, even if i give date for values it is considering that as string, but if introduce new level I am getting error.

{  
"properties": {  
"parameters": {  
"properties": {  
"parameters": {  
"properties": {  
"parameters": {  
"properties": {  
"templateKey": {  
"type": "string"  
},  
"values": {  
"type": "string"  
}  
}  
},  
"templateKey": {  
"type": "string"  
},  
"values": {  
"type": "string"  
}  
}  
},  
"templateKey": {  
"type": "string"  
},  
"values": {  
"type": "string"  
}  
}  
},  
"templateKey": {  
"type": "string"  
},  
"values": {  
"type": "string"  
}  
}  
}

![](https://us1.discourse-cdn.com/elastic/original/2X/7/7e6bc71a73a7aae460353acbe692e119d1dbdfc3.png)

---

<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:** [December 5, 2016, 11:43am UTC](https://discuss.elastic.co/t/disable-date-detection-for-already-created-type/65174/6 "2016-12-05T11:43:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
