# Wildcard search across multiple fields using RestHighLevelClient

**URL:** <https://discuss.elastic.co/t/wildcard-search-across-multiple-fields-using-resthighlevelclient/191972>\
**Category:** Elasticsearch\
**Created:** [July 24, 2019, 7:49am UTC](https://discuss.elastic.co/t/wildcard-search-across-multiple-fields-using-resthighlevelclient/191972 "2019-07-24T07:49:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saia](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@saia](https://discuss.elastic.co/u/saia)\
**Post date:** [July 24, 2019, 7:49am UTC](https://discuss.elastic.co/t/wildcard-search-across-multiple-fields-using-resthighlevelclient/191972/1 "2019-07-24T07:49:06Z")

</div>

I have documents like the following in my Elasticsearch index:

{  
"id": 3,  
"name": "Jon Loyens",  
"age" : 33,  
"address": "104, Hillside Avenue",  
"city": "London"  
"geo": {  
"code": 44,  
"country" : "UK"  
}  
}

Given a partial term like "on", I want to be able to get all the documents in the index which have **any field** containing "on". In the above example, both "name" and "city" have "on" in them and hence I would expect this document to be returned (and similarly any other document that contains "on" in any of the fields.)

Can someone lead me to the correct solution that will help me achieve this?

Also, I am using the RestHighLevelClient from Java in case it helps you.

Thanks for your help.

---

<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 21, 2019, 7:49am UTC](https://discuss.elastic.co/t/wildcard-search-across-multiple-fields-using-resthighlevelclient/191972/2 "2019-08-21T07:49:07Z")

</div>

Closed on August 21, 2019, 7:49am UTC

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