# Retrieve multifield data in search

**URL:** https://discuss.elastic.co/t/retrieve-multifield-data-in-search/225737
**Category:** Elasticsearch
**Created:** [March 30, 2020, 7:18pm UTC](https://discuss.elastic.co/t/retrieve-multifield-data-in-search/225737 "2020-03-30T19:18:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![RajaG](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@RajaG](https://discuss.elastic.co/u/RajaG)
#### Post date: [March 30, 2020, 7:18pm UTC](https://discuss.elastic.co/t/retrieve-multifield-data-in-search/225737/1 "2020-03-30T19:18:34Z")

</div>

Here is my mapping for a field:  
`"likes": { "type": "text", "fields": { "length": { "type": "token_count", "analyzer": "email_analyzer" } } }, `

likes is an array of email ids, i.e  
likes : ["[a@b.com](mailto:a@b.com)", "[b@c.com](mailto:b@c.com)"]

While searching, i would like to retrieve the "likes.length" field instead of entire likes as likes.length would store size of the array.

I tried with \_source : ["likes.length"] , but its not showing up.

thanks,  
Raja

---

<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 27, 2020, 7:18pm UTC](https://discuss.elastic.co/t/retrieve-multifield-data-in-search/225737/2 "2020-04-27T19:18:37Z")

</div>

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