# Upgrading 7.17 to 8.7 query search query not working

**URL:** <https://discuss.elastic.co/t/upgrading-7-17-to-8-7-query-search-query-not-working/334645>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [May 30, 2023, 7:29am UTC](https://discuss.elastic.co/t/upgrading-7-17-to-8-7-query-search-query-not-working/334645 "2023-05-30T07:29:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ak01](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@ak01](https://discuss.elastic.co/u/ak01)\
**Post date:** [May 30, 2023, 7:29am UTC](https://discuss.elastic.co/t/upgrading-7-17-to-8-7-query-search-query-not-working/334645/1 "2023-05-30T07:29:59Z")

</div>

What will be the new query this I was using in old version for search:

```auto
    const { body } = await Client.search({
      index: this.tableName,
      body: {
        sort: sortingData,
        from: skip,
        size: limit,
        query: {
          bool: {
            must: mustData,
          }
        }
      }
    });

```

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [May 30, 2023, 10:25am UTC](https://discuss.elastic.co/t/upgrading-7-17-to-8-7-query-search-query-not-working/334645/2 "2023-05-30T10:25:39Z")

</div>

Hi @ak01,

Welcome to the community! Which language client are you using?

---

<div class="post-metadata">

**Author:** ![ak01](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@ak01](https://discuss.elastic.co/u/ak01)\
**Post date:** [May 30, 2023, 10:39am UTC](https://discuss.elastic.co/t/upgrading-7-17-to-8-7-query-search-query-not-working/334645/3 "2023-05-30T10:39:07Z")

</div>

@carly.richmond I'm using Node.js.

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [May 31, 2023, 8:48am UTC](https://discuss.elastic.co/t/upgrading-7-17-to-8-7-query-search-query-not-working/334645/4 "2023-05-31T08:48:32Z")

</div>

Thanks for confirming. Do you have a particular error that is coming back with this code?

It's difficult to say what is wrong with your code without knowing either the error you are getting or the type of parameters `sortingData`, `skip`, `limit` and `mustData` , but you can check against the [`_search` API documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.8/search-search.html). But all parameters in the body of the request have been supported for some time, and the overall structure matches the [example in the documentation](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/search_examples.html).

---

<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:** [June 28, 2023, 8:49am UTC](https://discuss.elastic.co/t/upgrading-7-17-to-8-7-query-search-query-not-working/334645/5 "2023-06-28T08:49:06Z")

</div>

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