Hi
I'm trying to update an index-pattern in .kibana to contain another scripted field. In testing partial update of the document field I get an error. The partial update was the following:
curl -XPOST 'localhost:9200/.kibana/doc/index-pattern:5cd01980-e173-11e7-b90c-9930744e76ad/_update?pretty' -H 'Content-Type: application/json' -d'
{
"script" : "ctx._source.index\u002Dpattern.title = \u0027pddd\u0027"
}
'
but it returned the following:
{
"error" : {
"root_cause" : [
{
"type" : "remote_transport_exception",
"reason" : "[_Mtk082][127.0.0.1:9300][indices:data/write/update[s]]"
}
],
"type" : "illegal_argument_exception",
"reason" : "failed to execute script",
"caused_by" : {
"type" : "script_exception",
"reason" : "compile error",
"script_stack" : [ ],
"script" : "ctx._source.index-pattern.title = 'pddd'",
"lang" : "painless",
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "Left-hand side cannot be assigned a value."
}
}
},
"status" : 400
}
Any ideas why?