# ES 5.6.10 default mapping field store Double and BigDecimal into string

**URL:** https://discuss.elastic.co/t/es-5-6-10-default-mapping-field-store-double-and-bigdecimal-into-string/205966
**Category:** Elasticsearch
**Created:** [October 31, 2019, 2:39am UTC](https://discuss.elastic.co/t/es-5-6-10-default-mapping-field-store-double-and-bigdecimal-into-string/205966 "2019-10-31T02:39:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hubo3085632](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hubo3085632/32/23724_2.png) [@hubo3085632](https://discuss.elastic.co/u/hubo3085632)
#### Post date: [October 31, 2019, 2:39am UTC](https://discuss.elastic.co/t/es-5-6-10-default-mapping-field-store-double-and-bigdecimal-into-string/205966/1 "2019-10-31T02:39:20Z")

</div>

Hi guys , i use XContentBuilder as a source of Index Request to store my biz data, like this  
jsonBuilder()  
.startObject()  
.field("table", Constants.ES\_IDX\_REPAYMENT)  
.field("nation", repayment.getNation())  
.field("amount", repayment.getAmount())  
.endObject();  
i find the BigDecimal property repayment.getAmount() saved into ES as a string type field , but this property saved into ES 6.7 version is number type field.  
How to make up this issue?

---

<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: [November 28, 2019, 2:39am UTC](https://discuss.elastic.co/t/es-5-6-10-default-mapping-field-store-double-and-bigdecimal-into-string/205966/2 "2019-11-28T02:39:28Z")

</div>

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