mirror of
https://github.com/simon987/sist2.git
synced 2025-12-10 22:18:54 +00:00
(breaking) Upgrade path filter bar
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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();"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user