# A problem with numeric range query

**URL:** <https://discuss.elastic.co/t/a-problem-with-numeric-range-query/215174>\
**Category:** Elasticsearch\
**Created:** [January 15, 2020, 4:30pm UTC](https://discuss.elastic.co/t/a-problem-with-numeric-range-query/215174 "2020-01-15T16:30:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![D3ivid](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@D3ivid](https://discuss.elastic.co/u/D3ivid)\
**Post date:** [January 15, 2020, 4:30pm UTC](https://discuss.elastic.co/t/a-problem-with-numeric-range-query/215174/1 "2020-01-15T16:30:59Z")

</div>

Hi,

My name is David and I have a problem with a query.  
I tried to search the forum for similar topics but I haven't found anything, I appreciate any help in advance.  
This is the query that is giving me problems:

```
{
  "query":{
    "bool":{
      "must": [
        {"nested": {
          "path": "valores",
          "query": {
            "range": {
              "valores.dESDE_TRANSF": {
                "gte": 962031395626955
              }
            }
          }
        }},
        {"nested": {
          "path": "valores",
          "query": {
            "range": {
              "valores.hASTA_TRANSF": {
                "lte": 962031395626955
              }
            }
          }
        }}
      ]
    }
  }
}

```

The results that the query returns do not match this one

```
Result 1 =>

 "valores" : {
            "hASTA_TRANSF" : 962031425341212,
             "dESDE_TRANSF" : 962031425341212
}

Result 2 =>

"valores" : {
            "hASTA_TRANSF" : 962031401341185,
            "dESDE_TRANSF" : 962031401341185
}

```

Why?

This is my mapping configuration for these fields:

```
"hASTA_TRANSF" : {
                "type" : "float"
              },
"dESDE_TRANSF" : {
                "type" : "float"
              },

```

Thanks in advance.  
Best regards.

---

<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, 2020, 4:31pm UTC](https://discuss.elastic.co/t/a-problem-with-numeric-range-query/215174/2 "2020-02-12T16:31:06Z")

</div>

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