Use multiple wildcards DSL Query

Hello everyone , I just started using "DSL query" on my ELK platform and i want to make a DSL request that can use wildcard to perform matching search . my request will find all the mail_domain (term) that end with "" , "" , "" basically a list of domains , and dsplay them .

Here's my resquest

"query": {
"wildcard": {
"mail_domain.keyword": ["*" , "*" , "*"]

it seems like wilcard can't take an array of a term values . Do you have any idea how can i do it ?


This looks like a really bad idea. Elasticsearch will need to go thru every document to find those matches. To do this right you will need to index your data appropriately. Maybe add a domain field (with,, ... values), or even a simple boolean field isMyMatchedEmailDomain

you could also use to optimize your index for prefix wildcard searches

1 Like

Thanks man

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