0
我的映射中有以下动态模板。ElasticSearch - 映射中的无效日期时间格式
"dt": {
"match": "*Time",
"mapping": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd HH:mm:ss.SSS||yyyy-MM-ddTHH:mm:ssZ"
}
}
然而,当我插入带有 “BirthTime” 一份文件: “1992-05-06T00:00:00Z” 我收到以下错误:
"type":"illegal_argument_exception","reason":"Invalid format: [yyyy-MM-ddTHH:mm:ssZ]: Illegal pattern component: T"
我以为我的日期时间格式是ISO ES应该了解的标准。我的映射格式应该支持BirthTime?
在此先感谢。
工作!任何指向为什么这项工作或在文档中的位置?再次感谢! – user481779
Elasticsearch使用Joda进行日期时间操作。请参阅:http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html –