

























这是一个创建于 1277 天前的主题,其中的信息可能已经有所发展或是发生改变。
ES 官网说,
若有大佬知晓,还请不吝解释。
以下为官网原话:
- Values for milliseconds-since-the-epoch must be non-negative. Use a formatted date to represent dates before 1970.
- Internally, dates are converted to UTC (if the time-zone is specified) and stored as a long number representing milliseconds-since-the-epoch.
- Queries on dates are internally converted to range queries on this long representation, and the result of aggregations and stored fields is converted back to a string depending on the date format that is associated with the field.
- Dates will always be rendered as strings, even if they were initially supplied as a long in the JSON document.
1 julyclyde 2022 年 12 月 15 日和 1970 相关很有可能是 unix timestamp 吧 |
2 lllpla 2022 年 12 月 15 日说的挺清楚吧 1970 年开始的毫秒值。 1970 年 1 月 1 日 0 时 0 分 0 秒是 0 ,再之前的无法表示。 |
3 yangyaofei 2022 年 12 月 15 日这个貌似并不是他真的底层实现, 这个只是他的 Mapping 方式. 我曾经试验过, 存入的字符串是一直存储的, 不管是够改动了 Mapping 什么的都不会变, 但是解析的结果可能会有不一样或者不能解析. 可能他内部直接使用的 Lucene 的时间存储, 至于是什么其实不太重要吧, 可以翻源码 |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。