Wildcard search on all fields

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.

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

Any help will be appreciated.

Hi @Sheharyar_Khalid

Reading the answer says it's not possible because _all is depreced.


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

Thank you for sharing this

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