I'm trying to sum revenue from orders, But the 结果是 以浮点数计 .6299743652344
知道为什么吗?
数据中的字段是.00
("grand_total": 84.5)
s = Search(using=ES, index='orders')
s = s[:0]
s.aggs.metric('rev', 'sum', field='grand_total')
res = s.execute()
return res.aggs.rev.value