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

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -