Hello,
I'm new with the usage of script. I understand they are 2 modes to write the script itseft, in a single line and in multiline with the usage of """. But I found sample on Web, but in all cases I have a parsing exception.
{
"script": {
"source": """
doc['price'].value * params.factor;
""",
"lang":"painless"
}
}
Error :
"caused_by": {
"type": "json_parse_exception",
"reason": "Unexpected character ('"' (code 34)): was expecting comma to separate Object entries\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@42bd8f7; line: 3, column: 18]"
}
What I've missed? (I wish to create a stored script in multiline format)
ES Version: 7.4.1
REST Client: Postman