# Disabling date detection from Java API

**URL:** <https://discuss.elastic.co/t/disabling-date-detection-from-java-api/234180>\
**Category:** Elasticsearch\
**Created:** [May 25, 2020, 4:13pm UTC](https://discuss.elastic.co/t/disabling-date-detection-from-java-api/234180 "2020-05-25T16:13:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwaipayan](https://avatars.discourse-cdn.com/v4/letter/d/ce73a5/32.png) [@dwaipayan](https://discuss.elastic.co/u/dwaipayan)\
**Post date:** [May 25, 2020, 4:13pm UTC](https://discuss.elastic.co/t/disabling-date-detection-from-java-api/234180/1 "2020-05-25T16:13:52Z")

</div>

Hi,

I am trying to index a large JSON file in Elasticsearch but, some malformed date variables (containing `'\n'` inside date) is causing exception. I already came across this: [https://www.elastic.co/guide/en/elasticsearch/reference/5.0/dynamic-field-mapping.html#dynamic-field-mapping](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/dynamic-field-mapping.html#dynamic-field-mapping) but I wanted to do this from the Java API. Can you please help?

Thanks in advance.

---

<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:** [June 22, 2020, 4:14pm UTC](https://discuss.elastic.co/t/disabling-date-detection-from-java-api/234180/2 "2020-06-22T16:14:45Z")

</div>

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