插入的数据,maping中size默认就是long
返回的数据好像是用double类型,精度都不够了?
curl -XPOST '192.168.2.58:9200/test_index1/test_type1/_bulk?pretty' -H 'Content-Type: application/json' -d'
{ "index": {}}
{ "size" : 12345678901234567}
'
聚合curl -XPOST "http://192.168.2.58:9200/test_index1/_search" -H 'Content-Type: application/json' -d'
{
"aggregations": {
"total_obj_size": {
"sum": {
"field": "size"
}
}
},
"size": 0
}'
结果{
"took": 1,
"timed_out": false,
"_shards": {
"total": 6,
"successful": 6,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 0.0,
"hits": []
},
"aggregations": {
"total_obj_size": {
"value": 1.2345678901234568E16
}
}
}
size存储的数据不是long型的吗,为什么返回的数据使用科学计数法返回的?返回的数据好像是用double类型,精度都不够了?
1 个回复
rockybean - Elastic Certified Engineer, ElasticStack Fans,公众号:ElasticTalk
赞同来自: