(breaking) Upgrade path filter bar

This commit is contained in:
2020-03-03 16:24:24 -05:00
parent e5bb4856d2
commit 149de95d88
14 changed files with 188 additions and 98 deletions

View File

@@ -4,14 +4,14 @@
"type": "keyword",
"doc_values": true
},
"_depth": {
"type": "integer"
},
"path": {
"type": "text",
"analyzer": "path_analyzer",
"copy_to": "suggest_path"
},
"suggest_path": {
"type": "completion",
"analyzer": "case_insensitive_kw_analyzer"
"fielddata": true,
"index_prefixes": {}
},
"mime": {
"type": "keyword"

View File

@@ -3,7 +3,7 @@
"processors": [
{
"script": {
"source": "ctx._tie = ctx._id; ctx._depth = ctx.path.length() - ctx.path.replace(\"/\", \"\").length();"
"source": "ctx._tie = ctx._id; ctx._depth = ctx.path.length() == 0 ? 0 : 1 + ctx.path.length() - ctx.path.replace(\"/\", \"\").length();"
}
}
]