Separate query for excluded words

In the query below I'll exclude all the words that contain "vegetable". Is there a way to create a separate query to get all of the excluded words?

{
  "query": {
       "match_phrase": {"words": "get"}
  },
  "aggs": {
    "clusters": {
      "terms": {
        "field": "words",
        "exclude": ".*vegetable.*",

      }
    }
  }
}

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