# Search in all given filed but it return only match filed. so i can send those value on front end

**URL:** https://discuss.elastic.co/t/search-in-all-given-filed-but-it-return-only-match-filed-so-i-can-send-those-value-on-front-end/267770
**Category:** Elasticsearch
**Created:** [March 19, 2021, 9:16am UTC](https://discuss.elastic.co/t/search-in-all-given-filed-but-it-return-only-match-filed-so-i-can-send-those-value-on-front-end/267770 "2021-03-19T09:16:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mayank\_hardiya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mayank_hardiya/32/85757_2.png) [@mayank\_hardiya](https://discuss.elastic.co/u/mayank_hardiya)
#### Post date: [March 19, 2021, 9:16am UTC](https://discuss.elastic.co/t/search-in-all-given-filed-but-it-return-only-match-filed-so-i-can-send-those-value-on-front-end/267770/1 "2021-03-19T09:16:53Z")

</div>

My query - client.search({  
index: indexname,  
body: {  
query: {  
multi\_match: {  
query: req.query.search,  
fields: ["description","name","hostname","username","category\_name"],  
}  
},  
}  
},  
it return - [  
{  
"\_index": "onlive",  
"\_type": "\_doc",  
"\_id": "584",  
"\_score": 1,  
"\_source": {  
"description": "Free group Yoga session !!! for all levels Experience authentic Yoga from ancient scriptures",  
"name": "Free Yoga 108 asanas in 1hr",  
"hostname": "ghost",  
"username": "account\_1",  
"category\_name": "Other"  
}  
},  
{  
....  
},  
]

My query - client.search({  
index: indexname,  
body: {  
query: {  
multi\_match: {  
query: req.query.search,  
fields: ["description","name","hostname","username","category\_name"],  
}  
},  
}  
},

but When someone type - Yoga it returns data like [{ '\_id' : 584 , 'name': 'Free Yoga 108 asanas in 1hr'}]. is this possible.

---

<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: [April 16, 2021, 9:17am UTC](https://discuss.elastic.co/t/search-in-all-given-filed-but-it-return-only-match-filed-so-i-can-send-those-value-on-front-end/267770/2 "2021-04-16T09:17:00Z")

</div>

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