POST _analyze
{
"tokenizer": "path_hierarchy",
"text": "/one/two/three"
}
[ /one, /one/two, /one/two/three ]
PUT my_index
{
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "my_tokenizer"
}
},
"tokenizer": {
"my_tokenizer": {
"type": "path_hierarchy",
"delimiter": "-",
"replacement": "/",
"skip": 2
}
}
}
}
}
POST my_index/_analyze
{
"analyzer": "my_analyzer",
"text": "one-two-three-four-five"
}
[ /three, /three/four, /three/four/five ]
[ one/two/three/, two/three/, three/ ]