hello,
i want to get a ctx.payload like this :
"transform": {
"script": {
"source": "ctx.payload.transform = [ ]; def text = [ 'test1' : \"{{ctx.payload.hits.total}}\" ]; ctx.payload.transform.add(text); return ctx.payload.transform;",
"lang": "painless"
}
},
But the value of {{ctx.payload.hits.total}} is not affected to 'test1' but it affect the string.
How can i pass the value ?