# Match Wildcard Fallback

**URL:** <https://discuss.elastic.co/t/match-wildcard-fallback/2554>\
**Category:** Elasticsearch\
**Created:** [June 12, 2015, 9:46am UTC](https://discuss.elastic.co/t/match-wildcard-fallback/2554 "2015-06-12T09:46:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CalEuanHopkins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/caleuanhopkins/32/643_2.png) [@CalEuanHopkins](https://discuss.elastic.co/u/CalEuanHopkins)\
**Post date:** [June 12, 2015, 9:46am UTC](https://discuss.elastic.co/t/match-wildcard-fallback/2554/1 "2015-06-12T09:46:52Z")

</div>

Does anyone know if it's possible to run a `bool query` with `match` conditions and if no results are found, run a new `bool query` but with `wildcard` conditions? Can I achieve this by adding `wildcard` conditions to the `should bool query` weighting `match` conditions higher than the `wildcard` conditions to ensure `match` results have more relevance?

Looks for a contingency to ensure as many searches as possible come back with a result (even if it's a vague result), rather than come back empty with no result

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [June 12, 2015, 12:08pm UTC](https://discuss.elastic.co/t/match-wildcard-fallback/2554/2 "2015-06-12T12:08:10Z")

</div>

If you use a should clause it'll always execute the wildcard query which is  
much slower than the normal query. The simplest thing is just to run a  
wildcard if you don't get the results that you wanted in your application.  
Its slower for those users but puts less load on the system overall.

---

<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:** [July 6, 2017, 12:07am UTC](https://discuss.elastic.co/t/match-wildcard-fallback/2554/3 "2017-07-06T00:07:52Z")

</div>


