# Inconsistent field mapping -- sometimes string, sometimes long

**URL:** <https://discuss.elastic.co/t/inconsistent-field-mapping-sometimes-string-sometimes-long/39036>\
**Category:** Elasticsearch\
**Created:** [January 12, 2016, 8:54pm UTC](https://discuss.elastic.co/t/inconsistent-field-mapping-sometimes-string-sometimes-long/39036 "2016-01-12T20:54:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [January 14, 2016, 9:30am UTC](https://discuss.elastic.co/t/inconsistent-field-mapping-sometimes-string-sometimes-long/39036/3 "2016-01-14T09:30:55Z")

</div>

I think you might be hitting the issue described in [this post](https://discuss.elastic.co/t/sum-aggregation-returning-very-small-unrelated-values/26890/4?u=colings86) . This is a bug that was fixed in 2.0 so you will need to upgrade to avoid hitting it again or explicitly map the fields in your index and not rely on the dynamic mapping

---

_[View the full topic](https://discuss.elastic.co/t/inconsistent-field-mapping-sometimes-string-sometimes-long/39036)._
