# How can we get records from elasticsearch with wildcard queries having two keywords?

**URL:** <https://discuss.elastic.co/t/how-can-we-get-records-from-elasticsearch-with-wildcard-queries-having-two-keywords/240641>\
**Category:** Elasticsearch\
**Created:** [July 10, 2020, 4:46am UTC](https://discuss.elastic.co/t/how-can-we-get-records-from-elasticsearch-with-wildcard-queries-having-two-keywords/240641 "2020-07-10T04:46:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![navdeepk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navdeepk/32/58687_2.png) [@navdeepk](https://discuss.elastic.co/u/navdeepk)\
**Post date:** [July 10, 2020, 4:46am UTC](https://discuss.elastic.co/t/how-can-we-get-records-from-elasticsearch-with-wildcard-queries-having-two-keywords/240641/1 "2020-07-10T04:46:23Z")

</div>

using this

{  
"query": {  
"bool": {  
"must": [

```
                   {
          "wildcard": {
          "url.original":{
            "value" : "*version?"
          } 
          }

```

}  
],  
"must\_not": ,  
"should":   
}  
}

```
      }

```

But I have Other 5-10 keywords(admin, dashboard etc etc) , how can i pass other keywords in this ??

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 10, 2020, 10:48am UTC](https://discuss.elastic.co/t/how-can-we-get-records-from-elasticsearch-with-wildcard-queries-having-two-keywords/240641/2 "2020-07-10T10:48:57Z")

</div>

You can add multiple `wildcard` clauses within the `should` array.

Note that wildcard like this will be terribly slow.

---

<div class="post-metadata">

**Author:** ![navdeepk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navdeepk/32/58687_2.png) [@navdeepk](https://discuss.elastic.co/u/navdeepk)\
**Post date:** [July 10, 2020, 11:14am UTC](https://discuss.elastic.co/t/how-can-we-get-records-from-elasticsearch-with-wildcard-queries-having-two-keywords/240641/3 "2020-07-10T11:14:25Z")

</div>

Thanks very much , Its working with querystring with OR option.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 7, 2020, 11:14am UTC](https://discuss.elastic.co/t/how-can-we-get-records-from-elasticsearch-with-wildcard-queries-having-two-keywords/240641/4 "2020-08-07T11:14:34Z")

</div>

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