技术栈

ElasticSearch Date 类型

ELI_He9992024-08-27 9:17

Date datatype

多种时间格式

Multiple date formats

Multiple formats can be specified by separating them with || as a separator. Each format will be tried in turn until a matching format is found. The first format will be used to convert the milliseconds-since-the-epoch value back into a string.

复制代码
PUT my_index
{
  "mappings": {
    "_doc": {
      "properties": {
        "date": {
          "type":   "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        }
      }
    }
  }
}
上一篇:配置eslint时常见问题收录
下一篇:ant-design-vue@1在线主题编辑器实现
相关推荐
Elasticsearch
3 天前
Kibana 中的 SNMP 拓扑数据:从采集到 Canvas
elasticsearch
大大大大晴天
3 天前
Hudi技术内幕:RecordPayload到RecordMerger
大数据
SelectDB
3 天前
秒级弹性、最高降本 70%:SelectDB Serverless 如何重塑云数仓资源效率
大数据·后端·云原生
WhoAmI
3 天前
MapReduce框架原理解析一:InputFormat
大数据·hadoop
WhoAmI
3 天前
MapReduce框架原理解析三:OutputFormat
大数据·hadoop
WhoAmI
3 天前
MapReduce框架原理解析二:Shuffle
大数据·hadoop
大大大大晴天
4 天前
Hudi技术内幕:Key Generation原理与实践
大数据
Elasticsearch
5 天前
3个信号、2个环境变量、0个采集器:使用 Python 和 Elastic 的托管 OTLP 端点实现 OpenTelemetry
elasticsearch
Elasticsearch
7 天前
如何通过 Claude Code 来写入 CSV 数据到 Elasticsearch
elasticsearch
热门推荐
012026年6月AI大模型全景报告:GPT-5.6、Claude Opus 4.8、Gemini 3.5,中美AI三足鼎立谁主沉浮?022026 年 AI 编程工具终极横评:Cursor vs Claude Code vs Copilot vs Windsurf032026年6月AI行业全景:从百模大战到Agent元年,这30天发生了什么?04Claude Code、Codex、Cursor三分天下:2026年AI编程Agent生态全景剖析05【AI】2026 年具身智能模型和世界模型总结06GitHub 镜像站点07飞书长连接_事件订阅(接收消息,审批任务状态变更)08Trae国际版与国内版深度测评:AI原生IDE的双生花09【AI总结】2026年6月 主流国内外大模型总结102026年AI架构实战:彻底解决OpenAI接口超时与封号,Python调用GPT-5.2/Sora2企业级架构详解(附源码+压测报告)