# Syntax changes

**URL:** <https://discuss.elastic.co/t/syntax-changes/254418>\
**Category:** Elasticsearch\
**Created:** [November 5, 2020, 1:51pm UTC](https://discuss.elastic.co/t/syntax-changes/254418 "2020-11-05T13:51:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![somethingcool](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@somethingcool](https://discuss.elastic.co/u/somethingcool)\
**Post date:** [November 5, 2020, 1:51pm UTC](https://discuss.elastic.co/t/syntax-changes/254418/1 "2020-11-05T13:51:43Z")

</div>

Currently we are using Elastic 2.3.x and migrating to 6.8.x and noticed that one of our queries is no longer returning data. The data between the environment versions is 100% the same. We have a job that writes the same to both environments.

The query in question:

```auto
{
    "query": {
        "constant_score": {
            "filter": {
                "bool": {
                    "should": [
                        {
                            "term": {
                                "word": "hello"
                            }
                        }
                    ],
                    "must": [
                        {
                            "range": {
                                "year_term": {
                                    "gt": 0
                                }
                            }
                        }
                    ]
                }
            }
        }
    },
    "sort": {
        "year_term": {
            "order": "asc"
        }
    }
}

```

Would appreciate if someone can easily spot the issue

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 5, 2020, 2:31pm UTC](https://discuss.elastic.co/t/syntax-changes/254418/2 "2020-11-05T14:31:24Z")

</div>

Could you share a sample document and its mapping?

Basically could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can copy and paste in Kibana dev console, click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

---

<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:** [December 3, 2020, 2:31pm UTC](https://discuss.elastic.co/t/syntax-changes/254418/3 "2020-12-03T14:31:28Z")

</div>

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