# Faceting on Key-Value pair list/array

**URL:** <https://discuss.elastic.co/t/faceting-on-key-value-pair-list-array/5804>\
**Category:** Elasticsearch\
**Created:** [November 8, 2011, 3:30am UTC](https://discuss.elastic.co/t/faceting-on-key-value-pair-list-array/5804 "2011-11-08T03:30:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [November 8, 2011, 3:30am UTC](https://discuss.elastic.co/t/faceting-on-key-value-pair-list-array/5804/1 "2011-11-08T03:30:48Z")

</div>

Hi ,

I have a name value pair list and i want to apply facets on the name part.  
So the query should run as if its running on a array with just the name as  
its elements.

I have added all details in the gist - [https://gist.github.com/1346922](https://gist.github.com/1346922)

Thanks  
Vineeth

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [November 8, 2011, 6:04am UTC](https://discuss.elastic.co/t/faceting-on-key-value-pair-list-array/5804/2 "2011-11-08T06:04:25Z")

</div>

hey i got the answer from one of Shay's reply to a mail.

I got my purpose using term facets.  
But again am trying to understand the good/bad things on term\_facets VS  
nested types

Thanks  
Vineeth

On Tue, Nov 8, 2011 at 9:00 AM, Vineeth Mohan [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)wrote:

> Hi ,
> 
> I have a name value pair list and i want to apply facets on the name part.  
> So the query should run as if its running on a array with just the name as  
> its elements.
> 
> I have added all details in the gist - [Faceting on Key-Value pair list · GitHub](https://gist.github.com/1346922)
> 
> Thanks  
> Vineeth

---

<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, 3:49am UTC](https://discuss.elastic.co/t/faceting-on-key-value-pair-list-array/5804/3 "2017-07-06T03:49:38Z")

</div>


