# Wildcard search on all fields

**URL:** https://discuss.elastic.co/t/wildcard-search-on-all-fields/322693
**Category:** Elasticsearch
**Created:** [January 9, 2023, 2:15am UTC](https://discuss.elastic.co/t/wildcard-search-on-all-fields/322693 "2023-01-09T02:15:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Sheharyar\_Khalid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sheharyar_khalid/32/112227_2.png) [@Sheharyar\_Khalid](https://discuss.elastic.co/u/Sheharyar_Khalid)
#### Post date: [January 9, 2023, 2:15am UTC](https://discuss.elastic.co/t/wildcard-search-on-all-fields/322693/1 "2023-01-09T02:15:25Z")

</div>

Hello,  
I want to search a wildcard string **on all fields of a document**. Is there any way to do it?  
I was able to write this query but for some reason it always returns empty.

```auto
{"bool": {"must" : [{"wildcard": {"_all": "*search_string"}}]}}

```

Any help will be appreciated.

---

<div class="post-metadata">

### Author: ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)
#### Post date: [January 9, 2023, 2:40am UTC](https://discuss.elastic.co/t/wildcard-search-on-all-fields/322693/2 "2023-01-09T02:40:23Z")

</div>

Hi @Sheharyar_Khalid

Reading the [answer](https://stackoverflow.com/a/34147611/18778181) says it's not possible because \_all is depreced.

Doc:

> `_all` may no longer be enabled for indices created in 6.0+, use a custom field and the mapping `copy_to` parameter

---

<div class="post-metadata">

### Author: ![Sheharyar\_Khalid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sheharyar_khalid/32/112227_2.png) [@Sheharyar\_Khalid](https://discuss.elastic.co/u/Sheharyar_Khalid)
#### Post date: [January 9, 2023, 2:55am UTC](https://discuss.elastic.co/t/wildcard-search-on-all-fields/322693/3 "2023-01-09T02:55:08Z")

</div>

Thank you for sharing this

---

<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: [February 6, 2023, 2:55am UTC](https://discuss.elastic.co/t/wildcard-search-on-all-fields/322693/4 "2023-02-06T02:55:19Z")

</div>

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