# Unwanted Automatic Rounding of double

**URL:** <https://discuss.elastic.co/t/unwanted-automatic-rounding-of-double/68287>\
**Category:** Elasticsearch\
**Created:** [December 7, 2016, 11:09am UTC](https://discuss.elastic.co/t/unwanted-automatic-rounding-of-double/68287 "2016-12-07T11:09:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars2](https://avatars.discourse-cdn.com/v4/letter/l/4bbf92/32.png) [@Lars2](https://discuss.elastic.co/u/Lars2)\
**Post date:** [December 7, 2016, 11:09am UTC](https://discuss.elastic.co/t/unwanted-automatic-rounding-of-double/68287/1 "2016-12-07T11:09:42Z")

</div>

I have a longitude and latitude field in my database, which feed elasticsearch using the elasticsearch-jdbc. Both my longitude and latitude values are stored in ElasticSearch as a "Double". The database contains "51.9851034000" and ElasticSearch only contains "51.99".

How can i prevent ElasticSearch from rounding this value so i can use the correct Longitudes?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [December 7, 2016, 11:35am UTC](https://discuss.elastic.co/t/unwanted-automatic-rounding-of-double/68287/2 "2016-12-07T11:35:37Z")

</div>

Did you try to adjust parameters `rounding` and `scale`? See [https://github.com/jprante/elasticsearch-jdbc#parameters](https://github.com/jprante/elasticsearch-jdbc#parameters)

The default value of `scale` was changed to use two digits by user request, see [https://github.com/jprante/elasticsearch-jdbc/issues/43](https://github.com/jprante/elasticsearch-jdbc/issues/43)

---

<div class="post-metadata">

**Author:** ![Lars2](https://avatars.discourse-cdn.com/v4/letter/l/4bbf92/32.png) [@Lars2](https://discuss.elastic.co/u/Lars2)\
**Post date:** [December 7, 2016, 12:12pm UTC](https://discuss.elastic.co/t/unwanted-automatic-rounding-of-double/68287/3 "2016-12-07T12:12:38Z")

</div>

Thanks, i did not see that.  
Is there an option for max scale?

---

<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:** [January 4, 2017, 12:12pm UTC](https://discuss.elastic.co/t/unwanted-automatic-rounding-of-double/68287/4 "2017-01-04T12:12:50Z")

</div>

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