# Best way to make a field path\_hierarchy aggregatable in kibana

**URL:** <https://discuss.elastic.co/t/best-way-to-make-a-field-path-hierarchy-aggregatable-in-kibana/99140>\
**Category:** Kibana\
**Created:** [September 1, 2017, 2:13pm UTC](https://discuss.elastic.co/t/best-way-to-make-a-field-path-hierarchy-aggregatable-in-kibana/99140 "2017-09-01T14:13:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gmon/32/21738_2.png) [@gmon](https://discuss.elastic.co/u/gmon)\
**Post date:** [September 1, 2017, 2:13pm UTC](https://discuss.elastic.co/t/best-way-to-make-a-field-path-hierarchy-aggregatable-in-kibana/99140/1 "2017-09-01T14:13:27Z")

</div>

Hi,  
I to make a field 'aggregatable' in Kibana with a hierarchical data. The analyzer is set properly but when the docs are feed I can't make this field visible to make a visualization with terms (to do a pseudo hierarchical visualization in kibana).

Example  
DATA:  
"/LEVEL 1/LEVEL 2/"

FIELD DEF:  
"path\_hier": {  
"analyzer":"hier\_analyzer",  
"type": "text",  
"fields": {  
"hier": {  
"type": "text",  
"analyzer":"hier\_analyzer",  
"index":"analyzed"  
}  
}  
}

ANALYZER DEF:  
"analysis": {  
"analyzer": {  
"hier\_analyzer": {  
"tokenizer": "my\_tokenizer"  
}  
},  
"tokenizer": {  
"my\_tokenizer": {  
"type": "path\_hierarchy",  
"delimiter": "/"  
}  
}  
}

THANKS!

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [September 1, 2017, 6:58pm UTC](https://discuss.elastic.co/t/best-way-to-make-a-field-path-hierarchy-aggregatable-in-kibana/99140/2 "2017-09-01T18:58:32Z")

</div>

Text fields are not aggregatable. You'll have to add a multi-field (probably of type `keyword`) to accomplish this. See [https://www.elastic.co/guide/en/elasticsearch/reference/current/text.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/text.html).

---

<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:** [September 29, 2017, 6:59pm UTC](https://discuss.elastic.co/t/best-way-to-make-a-field-path-hierarchy-aggregatable-in-kibana/99140/3 "2017-09-29T18:59:00Z")

</div>

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