# Search all fields in elastic 7.x from 5.x

**URL:** https://discuss.elastic.co/t/search-all-fields-in-elastic-7-x-from-5-x/224167
**Category:** Elasticsearch
**Created:** [March 18, 2020, 6:10pm UTC](https://discuss.elastic.co/t/search-all-fields-in-elastic-7-x-from-5-x/224167 "2020-03-18T18:10:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sundeep\_Dangol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sundeep_dangol/32/45310_2.png) [@Sundeep\_Dangol](https://discuss.elastic.co/u/Sundeep_Dangol)
#### Post date: [March 18, 2020, 6:10pm UTC](https://discuss.elastic.co/t/search-all-fields-in-elastic-7-x-from-5-x/224167/1 "2020-03-18T18:10:23Z")

</div>

Hi we are migrating from Elastic 5.x to 7.x. And one of the breaking changes is the removal of \_all field in match query. Previous query looks like below where its doing search on all fields.

v 5.x

```auto
    GET /my_index/_search
    {
      "query": {
                  "match": {
                      "_all": {
                          "query": "hello"
                      }
                  }
              }
    }

```

What is the best way to do the same in v 7x?

```auto
    GET /my_index/_search
    {
      "query": {
                  "query_string": {
                      "query": "hello" 
                  }
      }
    }

```

**OR**

```auto
    GET /my_index/_search
    {
      "query": {
                  "multi_match": {
                      "query": "hello",
                      "fields": ["*"]
                  }
      }
    }

```

or is there another recommended way?

---

<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: [April 15, 2020, 6:12pm UTC](https://discuss.elastic.co/t/search-all-fields-in-elastic-7-x-from-5-x/224167/2 "2020-04-15T18:12:50Z")

</div>

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