# Multi field query

**URL:** <https://discuss.elastic.co/t/multi-field-query/201734>\
**Category:** Elasticsearch\
**Created:** [October 1, 2019, 6:38am UTC](https://discuss.elastic.co/t/multi-field-query/201734 "2019-10-01T06:38:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aditya\_Kar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aditya_kar/32/44720_2.png) [@Aditya\_Kar](https://discuss.elastic.co/u/Aditya_Kar)\
**Post date:** [October 1, 2019, 6:38am UTC](https://discuss.elastic.co/t/multi-field-query/201734/1 "2019-10-01T06:38:05Z")

</div>

Dear sir,

If I want to search from the index from multiple keywords then which one is appropriate and we can get a better result.  
GET subject\_index/\_search  
{  
"query": {  
"bool": {  
"must": [  
{  
"bool": {  
"should": [  
{  
"match": {  
"name": "c"  
}  
},  
{  
"match": {  
"description": "c"  
}  
},  
{  
"match": {  
"shortName": "c"  
}  
}  
]  
}  
}  
]  
}  
}  
}

OR

GET subject\_index/\_search  
{  
"query": {  
"query\_string": {  
"fields": ["name","description", "shortName"],  
"query": "c"  
}  
}  
}

OR

GET subject\_index/\_search  
{  
"query": {  
"multi\_match": {  
"query": "c",  
"fields": ["name","description","shortName"]  
}  
}  
}

---

<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:** [October 29, 2019, 6:38am UTC](https://discuss.elastic.co/t/multi-field-query/201734/2 "2019-10-29T06:38:14Z")

</div>

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