# Multiple fields wild card bool query

**URL:** <https://discuss.elastic.co/t/multiple-fields-wild-card-bool-query/272460>\
**Category:** Elasticsearch\
**Created:** [May 8, 2021, 5:43am UTC](https://discuss.elastic.co/t/multiple-fields-wild-card-bool-query/272460 "2021-05-08T05:43:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mithoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mithoon/32/78018_2.png) [@Mithoon](https://discuss.elastic.co/u/Mithoon)\
**Post date:** [May 8, 2021, 5:43am UTC](https://discuss.elastic.co/t/multiple-fields-wild-card-bool-query/272460/1 "2021-05-08T05:43:46Z")

</div>

Currently using below bool query which searches for a combination of all input words or either one of input word on the field "Name". How to query on multiple fields using wild cards?

POST inventory\_dev/\_search  
{  
"from": 0,  
"query": {  
"bool": {  
"must": [  
{  
"bool": {  
"should": [  
{  
"term": {  
"Name": {  
"value": "dove"  
}  
}  
},  
{  
"term": {  
"Name": {  
"value": "3.75oz"  
}  
}  
},  
{  
"bool": {  
"must": [  
{  
"wildcard": {  
"Name": {  
"value": "_dove_"  
}  
}  
},  
{  
"wildcard": {  
"Name": {  
"value": "_3.75oz_"  
}  
}  
}  
]  
}  
}  
]  
}  
}  
]  
}  
},  
"size": 10,  
"sort": [  
{  
"\_score": {  
"order": "desc"  
}  
}  
]  
}`Preformatted text`

---

<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:** [June 5, 2021, 5:43am UTC](https://discuss.elastic.co/t/multiple-fields-wild-card-bool-query/272460/2 "2021-06-05T05:43:47Z")

</div>

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