Using the returned value of sum aggregation - elasticsearch -
i made query sum "practicevalue" doubles.
{ "size" : 0, "query" : { "bool" : { "must_not" : [ { "missing" : { "field" : "practiceobj.practicevalue" } } ], "must" : [ { "match" : { "entityobj.description" : "first" } } ] } }, "aggs" : { "total" : { "sum" : { "script" : "(doc['practiceobj.practicevalue'].value)" } } } }
my query returned following:
{ "took": 32, "timed_out": false, "_shards": { "total": 5, "successful": 5, "failed": 0 }, "hits": { "total": 11477, "max_score": 0, "hits": [] }, "aggregations": { "total": { "value": 1593598.7499999984 } } }
how can use "total" value in order round it?
"value" equals 1593598.7499999984 , want make 1593598.75
thanks!
Comments
Post a Comment