# Facet Term with multi field

**URL:** <https://discuss.elastic.co/t/facet-term-with-multi-field/8055>\
**Category:** Elasticsearch\
**Created:** [June 12, 2012, 10:00am UTC](https://discuss.elastic.co/t/facet-term-with-multi-field/8055 "2012-06-12T10:00:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vgross](https://avatars.discourse-cdn.com/v4/letter/v/ee59a6/32.png) [@vgross](https://discuss.elastic.co/u/vgross)\
**Post date:** [June 12, 2012, 10:00am UTC](https://discuss.elastic.co/t/facet-term-with-multi-field/8055/1 "2012-06-12T10:00:25Z")

</div>

Hi !  
I have a problem concerning facets, my mapping for my field "tailles" is :

```
'tailles' : {
    'properties' :{
        'id' : {'type' : 'integer', 'include_in_all' : FALSE},
        'nom' : {
            'type' : 'multi_field', 
            'fields' : {
                'nom' : {
                    'type' : 'string', 
                },
                'untouched' : {
                    'type' : 'string',
                    'index' : 'not_analyzed',
                    'include_in_all' : FALSE
                }                
            }
        }
    }
}

```

When i apply a facet term with multi-field (tailles.nom.untouched et  
tailles.id), Facet return for any field, the "term" and the count on it,  
but they are more doublons because tailles.nom.untouched corresponding at  
one tailles.id. This facet return me 2 same results.  
For give an exemple : for one tailles "XL" with id "3" (id for the tailles)  
if 4 product corresponding at my query, the facet return :

```
               [0] => Array
                    (
                        [term] => XL
                        [count] => 4
                    )

                [1] => Array
                    (
                        [term] => 3
                        [count] => 4
                    )

```

So, I want to have this data in the same array like this :

```
               [0] => Array
                    (
                        [term.nom] => XL

                        [term.id] => 3
                        [count] => 4
                    )

```

It's possible to do that with elastic search ?

---

<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:24am UTC](https://discuss.elastic.co/t/facet-term-with-multi-field/8055/2 "2017-07-06T03:24:49Z")

</div>


