Use other query next to suggester

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 ??

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".

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

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

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