(mapping) Tokenize location fields

This commit is contained in:
2021-02-12 20:16:25 +01:00
parent 1f427749cf
commit 797c88f946

View File

@@ -1,4 +1,28 @@
{ {
"settings": {
"analysis": {
"analyzer": {
"custom_path_tree": {
"tokenizer": "custom_hierarchy"
},
"custom_path_tree_reversed": {
"tokenizer": "custom_hierarchy_reversed"
}
},
"tokenizer": {
"custom_hierarchy": {
"type": "path_hierarchy",
"delimiter": "/",
"skip": 3
},
"custom_hierarchy_reversed": {
"type": "path_hierarchy",
"delimiter": "/",
"reverse": "true"
}
}
}
},
"mappings" : { "mappings" : {
"properties": { "properties": {
"Artist": { "Artist": {
@@ -27,6 +51,19 @@
}, },
"Kind": { "Kind": {
"type": "keyword" "type": "keyword"
},
"Location": {
"type": "text",
"fields": {
"tree": {
"type": "text",
"analyzer": "custom_path_tree"
},
"tree_reversed": {
"type": "text",
"analyzer": "custom_path_tree_reversed"
}
}
} }
} }
} }