# Why "long" filed can save double value?

**URL:** https://discuss.elastic.co/t/why-long-filed-can-save-double-value/36699
**Category:** Elasticsearch
**Created:** [December 9, 2015, 7:36am UTC](https://discuss.elastic.co/t/why-long-filed-can-save-double-value/36699 "2015-12-09T07:36:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sambean](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sambean/32/6507_2.png) [@sambean](https://discuss.elastic.co/u/sambean)
#### Post date: [December 9, 2015, 7:36am UTC](https://discuss.elastic.co/t/why-long-filed-can-save-double-value/36699/1 "2015-12-09T07:36:42Z")

</div>

I create a index ,and create a filed,and this field's data type is long, I try to save double value in this field,and I think ES will change data type to double,but nothing happen, someone can tell me why？

this is filed mapping

purchase.latest\_priceHk: {  
type: "long"  
},

this is value

purchase.latest\_priceHk: 147.83

---

<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: [July 5, 2017, 11:32pm UTC](https://discuss.elastic.co/t/why-long-filed-can-save-double-value/36699/2 "2017-07-05T23:32:24Z")

</div>


