Separate query for excluded words


#1

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

      }
    }
  }
}

(system) #2

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