Hello all. I'm having some trouble with the JSON input field , i have read all the documentation i can find yet this script does not work either syntactically , runtime error or compilation error
{
"script" :
{
"source": """
int i = 0;
while(doc['id'])
{
doc['id'].value - doc['id'].value + i;
i++;
}
"""
}
}
Basically what i want is to increment the last field of this data table by 1 for every row
Thank you