How to query multiple hosts using in elasticsearch using wildcard

hey all iam new to elk , iam trying to get all the hosts in the Elasticsearch db , i tried using a wildcard and

"wild_card": "hosts",
"query": {
"host.keyword": "test*",
"severity.keyword": "err"

consider there are multiple hosts like test1,test2,test3 i want to all them to be listed in a query , can someone help me with this


Kindly to check this doc,

i tried with my data,

GET index-name/_search
  "query": {
    "wildcard": {
      "host.hostname": {
        "value": "hostname-*",
        "boost": 1.0,
        "rewrite": "constant_score"

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