身安不如心安,屋宽不如心宽 。

聚合sum max min 精度问题

Elasticsearch | 作者 thor_wzy | 发布于2019年11月29日 | 阅读数:1724

{
    "took": 1,
    "timed_out": false,
    "_shards": {
        "total": 3,
        "successful": 3,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": 1,
        "max_score": 1,
        "hits": [
            {
                "_index": "testwzynew1",
                "_type": "vsoc_code",
                "_id": "2",
                "_score": 1,
                "_source": {
                    "price_long": 897946256,
                    "price_double": 897946256,
                    "price_string": "897946256",
                    "price_float": 897946256
                }
            }
        ]
    },
    "aggregations": {
        "price_double": {
            "value": 897946240
        },
        "price_long": {
            "value": 897946240
        },
        "price_float": {
            "value": 897946240
        }
    }
}
已邀请:

thor_wzy

赞同来自:

只有一条数据,最后对这个数据做聚合后,差了16,如果聚合的数没有操作7位,是没有问题的,超过7位数就会有偏差,这是怎么回事

huangmingzhi - 90后 搜索

赞同来自:

要回复问题请先登录注册