【发布时间】:2018-12-13 05:44:03
【问题描述】:
我正在尝试使用 Kibana 中的 Visualize 功能来绘制每月 date_histogram 图表,该图表计算我系统中的消息数。消息类型有一个sent_at 字段,自纪元时间起存储为number。
虽然我可以用 elasticsearch 查询做到这一点
POST /_all/message/_search?size=0
{
"aggs" : {
"monthly_message" : {
"date_histogram" : {
"field" : "sent_at",
"interval" : "month"
}
}
}
}
我在 Kibana 中遇到了一个问题:No Compatible Fields: The "myindex" index pattern does not contain any of the following field types: date
有没有办法让 Kibana 使用 number 字段作为日期?
【问题讨论】:
标签: elasticsearch kibana aggregation