# Weird range query behavior

**URL:** <https://discuss.elastic.co/t/weird-range-query-behavior/115578>\
**Category:** Elasticsearch\
**Created:** [January 15, 2018, 4:30pm UTC](https://discuss.elastic.co/t/weird-range-query-behavior/115578 "2018-01-15T16:30:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lepereira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lepereira/32/26583_2.png) [@lepereira](https://discuss.elastic.co/u/lepereira)\
**Post date:** [January 15, 2018, 4:30pm UTC](https://discuss.elastic.co/t/weird-range-query-behavior/115578/1 "2018-01-15T16:30:49Z")

</div>

I am having some problems with nested range query, the value that I am looking is 508 but if I search for 'gte' \> 311 for eg. it works but if I do the same using 309 it doesn't works.

Here is my query on gist:

> <https://gist.github.com/lepereira/c20a535589699eff112afbd57902092c>

Here is my mapping:

> <https://gist.github.com/lepereira/fa0c51dfefaf25f980c6b4b8e1f3993c>

Here is the data that I am looking for:

> <https://gist.github.com/lepereira/dd382e50d49ed54d31240a8b4c1ac477>

---

<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:** [February 12, 2018, 4:31pm UTC](https://discuss.elastic.co/t/weird-range-query-behavior/115578/2 "2018-02-12T16:31:10Z")

</div>

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