# Upgrade Help: The filter context has been removed in 7.X will old query work?

**URL:** <https://discuss.elastic.co/t/upgrade-help-the-filter-context-has-been-removed-in-7-x-will-old-query-work/261179>\
**Category:** Elasticsearch\
**Created:** [January 14, 2021, 8:28pm UTC](https://discuss.elastic.co/t/upgrade-help-the-filter-context-has-been-removed-in-7-x-will-old-query-work/261179 "2021-01-14T20:28:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JonathanAaron](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonathanaaron/32/24405_2.png) [@JonathanAaron](https://discuss.elastic.co/u/JonathanAaron)\
**Post date:** [January 14, 2021, 8:28pm UTC](https://discuss.elastic.co/t/upgrade-help-the-filter-context-has-been-removed-in-7-x-will-old-query-work/261179/1 "2021-01-14T20:28:04Z")

</div>

Will my query from 6.X still work? I'm hoping I don't have to change the query since it's being ran on legacy apps.

```auto
        {
      "constant_score": {
        "filter": {
          "bool": {
            "adjust_pure_negative": true,
            "must": [
              {
                "bool": {
                  "adjust_pure_negative": true,
                  "should": [
                    {
                      "bool": {
                        "adjust_pure_negative": true,
                        "must": [
                          {
                            "term": {
                              "userNumber": {
                                "boost": 1,
                                "value": 42 }
                            }
                          },
                          {
                            "range": {
                              "date": {
                                "format": "yyyy-MM-dd",
                                "include_lower": true,
                                "include_upper": true,
                                "from": "2018-02-18",
                                "boost": 1,
                                "to": "2018-03-03"
                              }
                            }
                          }
                        ],
                        "boost": 1
                      }
                    }
                  ],
                  "minimum_should_match": "1",
                  "boost": 1
                }
              }
            ],
            "boost": 1
          }
        },
        "boost": 1
      }
    }

```

---

<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 11, 2021, 8:28pm UTC](https://discuss.elastic.co/t/upgrade-help-the-filter-context-has-been-removed-in-7-x-will-old-query-work/261179/2 "2021-02-11T20:28:05Z")

</div>

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