Server returned HTTP response code: 400 for URL, when sending a post request to elasticsearch?

I'll not be able to help you more with Painless. I can only suggest to try some following expressions :

cf: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting-painless.html#_accessing_doc_values_from_painless

"inline" : "double d = doc['chargeamount'].value; return d;"

"inline" : "Double.valueOf(doc['chargeamount'].value);"

"inline" : "Double.valueOf(doc['chargeamount'].value).intValue;"

Or some else to determine the type of your field... Good luck !

1 Like