Best way to make a field path_hierarchy aggregatable in kibana

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!

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.

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