# Custom dynamic mapping for date through java

**URL:** <https://discuss.elastic.co/t/custom-dynamic-mapping-for-date-through-java/116180>\
**Category:** Elasticsearch\
**Created:** [January 19, 2018, 8:03am UTC](https://discuss.elastic.co/t/custom-dynamic-mapping-for-date-through-java/116180 "2018-01-19T08:03:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![avinashmisra](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@avinashmisra](https://discuss.elastic.co/u/avinashmisra)\
**Post date:** [January 19, 2018, 8:03am UTC](https://discuss.elastic.co/t/custom-dynamic-mapping-for-date-through-java/116180/1 "2018-01-19T08:03:31Z")

</div>

Hi,

I am working on custom dynamic date mapping and was able to create that through java.  
Currently issue that I am facing is, while doing search on that data, it takes some time to come for the first time. This was not the case if I use dynamic mapping on date that elastic provides.

Elastic version :2.4

Any idea why is it taking time to execute the query in case of custom dynamic mapping?

Thanks in advance,  
Abinash

---

<div class="post-metadata">

**Author:** ![avinashmisra](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@avinashmisra](https://discuss.elastic.co/u/avinashmisra)\
**Post date:** [January 19, 2018, 10:17am UTC](https://discuss.elastic.co/t/custom-dynamic-mapping-for-date-through-java/116180/2 "2018-01-19T10:17:25Z")

</div>

Resolved with refreshindex call

---

<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:** [February 16, 2018, 10:17am UTC](https://discuss.elastic.co/t/custom-dynamic-mapping-for-date-through-java/116180/3 "2018-02-16T10:17:29Z")

</div>

Closed on February 16, 2018, 10:17am UTC

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