(breaking) Upgrade path filter bar

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

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();"
}
}
]