How to use term with wildcard in ElasticSearch? How to use term with wildcard in ElasticSearch? elasticsearch elasticsearch

How to use term with wildcard in ElasticSearch?


You can use bool's should part, I don't think there is a "terms" like query for wildcard and should behaves like an OR:

{  "query": {    "bool": {      "should": [        {"wildcard": {"IP": "192.168.*.11"}},        {"wildcard": {"IP": "192.168.*.13"}}      ]    }  }}