# Trying to understand query\_string\_query behavior change

**URL:** <https://discuss.elastic.co/t/trying-to-understand-query-string-query-behavior-change/154242>\
**Category:** Elasticsearch\
**Created:** [October 26, 2018, 5:14pm UTC](https://discuss.elastic.co/t/trying-to-understand-query-string-query-behavior-change/154242 "2018-10-26T17:14:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ditch182](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ditch182/32/36986_2.png) [@ditch182](https://discuss.elastic.co/u/ditch182)\
**Post date:** [October 26, 2018, 5:14pm UTC](https://discuss.elastic.co/t/trying-to-understand-query-string-query-behavior-change/154242/1 "2018-10-26T17:14:37Z")

</div>

Hello all,  
I'm in the process of upgrading from 5.5 to 6.3, using the AWS ElasticSearchService. I've run into a behavior change between the two, and while I understand the underlying reason, I'm unsure as to why the behavior changed.

Essentially, I have a 'long' field that stores a timestamp. When using the fields parameter with the query\_string\_query in 5.5 I'm able to query the field as a string, no problem:

```
PUT test
{
  "mappings": {
    "asset": {
      "properties": {
        "timestamp": {
          "type": "long"
        },
        "title": {
          "type": "text"
        }
      }
    }
  }
}

PUT test/asset/1
{
    "timestamp": 1540515639,
    "title": "A title"
}

GET test/_search
{
  "query": {
    "query_string": {
      "fields": [
        "timestamp"
        ], 
      "query": ">1540515638"
    }
  }
}

```

The query returns the correct result in 5.5  
However, in 6.3 I get:

```
"type": "number_format_exception",
"reason": "For input string: \">1540515638\""

```

I can certainly make the query work by using a field prefix, and not using the 'fields' parameter. But this is part of a larger search application, and that's not a great solution for me.  
I'm hypothesizing that this is due to the disappearance of the \_all field in some way, but I'm having trouble understanding what changed. Any thoughts?

Thanks,  
Richard

---

<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:** [November 23, 2018, 5:18pm UTC](https://discuss.elastic.co/t/trying-to-understand-query-string-query-behavior-change/154242/2 "2018-11-23T17:18:53Z")

</div>

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