.join doesn’t work with elasticsearch scripted upated
{ “query”: { “bool”:{“must”:[{“exists”:{“field”:”location”}}] } }, “script”:{“source”: “def location = ctx._source.location; def theparts = location.splitOnToken(‘,’); ctx._source.straight_line =’LINESTRING (-85.5401513201531 37.66719841993451,’ + theparts[1] + ‘ ‘ + theparts[0] + ‘)’;”}}