# Use other query next to suggester

**URL:** <https://discuss.elastic.co/t/use-other-query-next-to-suggester/293921>\
**Category:** Elasticsearch\
**Created:** [January 10, 2022, 5:21pm UTC](https://discuss.elastic.co/t/use-other-query-next-to-suggester/293921 "2022-01-10T17:21:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amir\_Faramarzi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amir_faramarzi/32/92919_2.png) [@Amir\_Faramarzi](https://discuss.elastic.co/u/Amir_Faramarzi)\
**Post date:** [January 10, 2022, 5:21pm UTC](https://discuss.elastic.co/t/use-other-query-next-to-suggester/293921/1 "2022-01-10T17:21:56Z")

</div>

How to use other query next to suggester that affects the score of the data obtained from suggester

For example, I want to search for products that are active ??

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 11, 2022, 12:20am UTC](https://discuss.elastic.co/t/use-other-query-next-to-suggester/293921/2 "2022-01-11T00:20:59Z")

</div>

Can you elaborate a little more on what you want to do, as it's not clear what suggester has to do with searching for things that are "active".

---

<div class="post-metadata">

**Author:** ![Amir\_Faramarzi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amir_faramarzi/32/92919_2.png) [@Amir\_Faramarzi](https://discuss.elastic.co/u/Amir_Faramarzi)\
**Post date:** [January 11, 2022, 5:13am UTC](https://discuss.elastic.co/t/use-other-query-next-to-suggester/293921/3 "2022-01-11T05:13:22Z")

</div>

The following code is incorrect, but I mean such a query

```auto
GET products/_search
{
  "query": {
    "bool": {
      "should": [
        {
          "term": {
            "is_active": {
              "value": true
            }
          }
        },
        {
          "suggest": {
            "test": {
              "prefix": "test",
              "completion": {
                "field": "name.auto_completed"
              }
            }
          }
        }
      ]
    }
  }
}

```

---

<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 8, 2022, 5:13am UTC](https://discuss.elastic.co/t/use-other-query-next-to-suggester/293921/4 "2022-02-08T05:13:46Z")

</div>

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