# Odd behavior when similar paths contain different types

**URL:** <https://discuss.elastic.co/t/odd-behavior-when-similar-paths-contain-different-types/32422>\
**Category:** Elasticsearch\
**Created:** [October 17, 2015, 1:54am UTC](https://discuss.elastic.co/t/odd-behavior-when-similar-paths-contain-different-types/32422 "2015-10-17T01:54:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_D\_Ament](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_d_ament/32/764_2.png) [@John\_D\_Ament](https://discuss.elastic.co/u/John_D_Ament)\
**Post date:** [October 17, 2015, 1:54am UTC](https://discuss.elastic.co/t/odd-behavior-when-similar-paths-contain-different-types/32422/1 "2015-10-17T01:54:37Z")

</div>

I have an area of my data that is just default mapped, I'm not providing any specific mapping. My structure may look like

"fields.bob.value"="some string"  
"fields.dt.value"=123456

I was implemented a multi match query, where the input for fields look like "fields.\*.value", and the search term "string". I receive a NumberFormatException, which I'm assuming is because fields.dt.value is a numeric value. Is this a limitation of how the paths resolve? I assumed that since the documents go flat the name "value" shouldn't matter much across, however I can see the issue with a search like this.

I'm using ES 1.5.2

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 18, 2015, 11:56pm UTC](https://discuss.elastic.co/t/odd-behavior-when-similar-paths-contain-different-types/32422/2 "2015-10-18T23:56:12Z")

</div>

> [@John\_D\_Ament](#):
>
> I'm assuming is because fields.dt.value is a numeric value

Yep, and ES doesn't know how to compare a string to an number. So it's not a path issue.  
The only way around that would be to map the `fields.dt.value` as a string as well.

---

<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:44pm UTC](https://discuss.elastic.co/t/odd-behavior-when-similar-paths-contain-different-types/32422/3 "2017-07-05T23:44:10Z")

</div>


