# Range Query

**URL:** <https://discuss.elastic.co/t/range-query/5463>\
**Category:** Elasticsearch\
**Created:** [September 27, 2011, 1:02pm UTC](https://discuss.elastic.co/t/range-query/5463 "2011-09-27T13:02:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghosh](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@ghosh](https://discuss.elastic.co/u/ghosh)\
**Post date:** [September 27, 2011, 1:02pm UTC](https://discuss.elastic.co/t/range-query/5463/1 "2011-09-27T13:02:52Z")

</div>

Hello,

I wonder why the Range Query doesnt seem to work properly. What am I doing  
wrong? I'm using the ES-Head-GUI and doing a simple range query on a field  
from 1 to 499. The result now also contains values like 1799. It seems  
ElasticSearch is doing a string comparison. The value, however, is clearly  
integer as can be seen if I set ESHead to return the results as JSON.  
Numbers are not quoted and appear in blue.

Thank you!

---

<div class="post-metadata">

**Author:** ![ghosh](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@ghosh](https://discuss.elastic.co/u/ghosh)\
**Post date:** [September 27, 2011, 1:37pm UTC](https://discuss.elastic.co/t/range-query/5463/2 "2011-09-27T13:37:51Z")

</div>

Nevermind. You can ignore this. I recreated the database from scratch and  
the problem went away. I suppose this is because a different mapping as  
string was automatically created earlier. This is still a bit confusing IMO

- especially as there is currently no GUI for those mappings AFAICT.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 27, 2011, 10:22pm UTC](https://discuss.elastic.co/t/range-query/5463/3 "2011-09-27T22:22:19Z")

</div>

You can see the mappings for a specific type using the get mappings API.

On Tue, Sep 27, 2011 at 4:37 PM, ghosh [ghosh@q-one.eu](mailto:ghosh@q-one.eu) wrote:

> Nevermind. You can ignore this. I recreated the database from scratch and  
> the problem went away. I suppose this is because a different mapping as  
> string was automatically created earlier. This is still a bit confusing IMO
> 
> - especially as there is currently no GUI for those mappings AFAICT.

---

<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 6, 2017, 3:53am UTC](https://discuss.elastic.co/t/range-query/5463/4 "2017-07-06T03:53:26Z")

</div>


