# Faceting question

**URL:** <https://discuss.elastic.co/t/faceting-question/17437>\
**Category:** Elasticsearch\
**Created:** [May 9, 2014, 7:19pm UTC](https://discuss.elastic.co/t/faceting-question/17437 "2014-05-09T19:19:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramdev\_Wudali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramdev_wudali/32/7894_2.png) [@Ramdev\_Wudali](https://discuss.elastic.co/u/Ramdev_Wudali)\
**Post date:** [May 9, 2014, 7:19pm UTC](https://discuss.elastic.co/t/faceting-question/17437/1 "2014-05-09T19:19:13Z")

</div>

Hi :  
I have data that is like so :

{  
"Object1" : {  
"text" : "This is text"  
"id": 123  
},  
"Attribute2" : "attribute\_value"  
}......

I want to facet (terms) on Object1.id, However, when the results are  
returned, I want the Text to be the value associated with the count.  
Is it possible to do that ?

for example :

the face results should show :

"facets": {  
"terms": [  
{  
"term": "651", \<======== Show Object1.text corresponding  
to id : 651  
"count": 5300  
},  
{  
"term": "188", \<========== Show Object1.text  
corresponding to id : 188  
"count": 1776  
},  
]

Thanks

Ramdev

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/64fe52b8-57aa-41e1-aec5-63e186aa0113%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/64fe52b8-57aa-41e1-aec5-63e186aa0113%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:30am UTC](https://discuss.elastic.co/t/faceting-question/17437/2 "2017-07-06T01:30:27Z")

</div>


