mirror of
https://github.com/sist2app/sist2.git
synced 2026-01-21 02:11:53 +00:00
(breaking) Set item depth in ingest pipeline
This commit is contained in:
@@ -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();"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user