# Search for a value and return all respective fields

**URL:** <https://discuss.elastic.co/t/search-for-a-value-and-return-all-respective-fields/77479>\
**Category:** Elasticsearch\
**Created:** [March 6, 2017, 10:49am UTC](https://discuss.elastic.co/t/search-for-a-value-and-return-all-respective-fields/77479 "2017-03-06T10:49:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sup3race](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sup3race/32/14739_2.png) [@sup3race](https://discuss.elastic.co/u/sup3race)\
**Post date:** [March 6, 2017, 10:49am UTC](https://discuss.elastic.co/t/search-for-a-value-and-return-all-respective-fields/77479/1 "2017-03-06T10:49:57Z")

</div>

Hi, i have a lot of content in my Elasticsearch, 1 index, 100 types.

Example:  
DOC 1:  
`"_index": "test", "_type": "type1", "_id": "0000000001", "_score": 5.499016, "_source": { "facebook": "example111", "twitter": "yyyyy", "instagram": "ccccc"`

DOC 2:  
`"_index": "test", "_type": "type2", "_id": "0000000001", "_score": 5.499016, "_source": { "facebook42424": "example111", "elastic": "zzzzzz", "google": "aaaaaaa"`

DOC 3:  
`"_index": "test", "_type": "type3", "_id": "0000000001", "_score": 5.499016, "_source": { "facebook2332": "example111", "dsa": 87878787, "sdasda": "bbbbb"`

I search for value "example111" in all types and it returns all documents that contain that value, but you must consider that my documents have many fields.  
What I'm trying to do is searching for a value and get all respective fields. I have same values but different fields and i want to see where value "example111" is present.  
PS: i dont know the fields name, i know only the values (i cant inspect all documents to see their respective fields.)  
In the case above i want to return:

1. Value "example111" is present in: doc\_type 1 , field: facebook
2. Value "example111" is present in: doc\_type 2 , field: facebook42424
3. Value "example111" is present in: doc\_type 3 , field: facebook2332

Can someone help me please? Thank you in advance

---

<div class="post-metadata">

**Author:** ![sup3race](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sup3race/32/14739_2.png) [@sup3race](https://discuss.elastic.co/u/sup3race)\
**Post date:** [March 6, 2017, 3:43pm UTC](https://discuss.elastic.co/t/search-for-a-value-and-return-all-respective-fields/77479/2 "2017-03-06T15:43:02Z")

</div>

any 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:** [April 3, 2017, 3:43pm UTC](https://discuss.elastic.co/t/search-for-a-value-and-return-all-respective-fields/77479/3 "2017-04-03T15:43:17Z")

</div>

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