I am attempting to reindex data that was originally uploaded as individual lat and lon strings into a single geo_point. In Dev Tools I attempted to use the following
POST _reindex
{
"source": {
"index": "ais_ben_test"
},
"dest": {
"index": "ais_ben_geod"
},
"script": {
"lang": "painless",
"source": "ctx._source['GEO_POINT'] = ctx._source['LAT'] + ", " + ctx._source['LON']"
}
}
I am getting the following error from my code
{ "error": {
"root_cause": [
{
"type": "x_content_parse_exception",
"reason": "[10:67] [script] failed to parse object"
}
],
"type": "x_content_parse_exception",
"reason": "[10:67] [reindex] failed to parse field [script]",
"caused_by": {
"type": "x_content_parse_exception",
"reason": "[10:67] [script] failed to parse object",
"caused_by": {
"type": "json_parse_exception",
"reason": "Unexpected character ('}' (code 125)): was expecting a colon to separate field name and value\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@491171b5; line: 11, column: 4]"
}
}
},
"status": 400
}
I have tried reformatting with a colon added at multiple areas of line 11 but none of my attempts have been successful. Any help would be appreciated.