# Is it possible to Return only one filed with Id

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-return-only-one-filed-with-id/267664>\
**Category:** Elasticsearch\
**Created:** [March 18, 2021, 1:06pm UTC](https://discuss.elastic.co/t/is-it-possible-to-return-only-one-filed-with-id/267664 "2021-03-18T13:06:43Z")\
**Posts on this page:** 4\
**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 18, 2021, 1:06pm UTC](https://discuss.elastic.co/t/is-it-possible-to-return-only-one-filed-with-id/267664/1 "2021-03-18T13:06:43Z")

</div>

[  
{  
"\_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"  
}  
},  
{  
....  
},  
]

- This is my data. I apply search on description, name, hostname, username, and category\_name. but it returns all this field when data matched in any one field. I want only matched filed and id returns when search word found.

---

<div class="post-metadata">

**Author:** ![nhat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nhat/32/22170_2.png) [@nhat](https://discuss.elastic.co/u/nhat)\
**Post date:** [March 18, 2021, 1:26pm UTC](https://discuss.elastic.co/t/is-it-possible-to-return-only-one-filed-with-id/267664/2 "2021-03-18T13:26:22Z")

</div>

Hi @mayank_hardiya, this [guide](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html) shows you how to select fields to retrieve.

---

<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:03am UTC](https://discuss.elastic.co/t/is-it-possible-to-return-only-one-filed-with-id/267664/3 "2021-03-19T09:03:18Z")

</div>

but it did not return value like - { '\_id': '584', 'hostname':'ghost'}

---

<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:04am UTC](https://discuss.elastic.co/t/is-it-possible-to-return-only-one-filed-with-id/267664/4 "2021-04-16T09:04:00Z")

</div>

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