In the below query likeCount
is a string field, but I need to do a increment operation on it, with the below query, it is doing a concatenation operation instead of increment.
POST /posts/_update/<id>
{
"script" : {
"source": "ctx._source.likeCount++"
}
}