(breaking) Set item depth in ingest pipeline

This commit is contained in:
simon987
2020-03-02 17:39:25 -05:00
parent d78994d427
commit e5bb4856d2
5 changed files with 9 additions and 9 deletions

View File

@@ -1,9 +1,9 @@
{
"description": "Copy _id to _tie",
"description": "Copy _id to _tie, save path depth",
"processors": [
{
"script": {
"source": "ctx._tie = ctx._id;"
"source": "ctx._tie = ctx._id; ctx._depth = ctx.path.length() - ctx.path.replace(\"/\", \"\").length();"
}
}
]