【发布时间】:2015-12-10 05:10:58
【问题描述】:
这是我的查询
{
"filter": {
"bool": {
"must": [{
"range": {
"timestamp": {
"gte": "now-24"
}
}
}, {
"term": {
"program": "dashboard"
}
}]
}
}
}
elasticsearch 中的数据样本:
{
"_index": "logstash-2015.09.14",
"_type": "logs",
"_id": "AU_MPG6xoSXeyoJeeaQ1",
"_score": 1,
"_source": {
"message": "testing for clustering--473983--https://github.com/mobz/elasticsearch-headThis will automatically download the latest version of elasticsearch-head from github and run it as ugin within the elasticsearch cluster.",
"@version": "1",
"@timestamp": "2015-09-14T14:23:16.000Z",
"host": "172.17.42.1",
"priority": 13,
"timestamp": "Sep 14 14:23:16",
"logsource": "cn1",
"program": "ubuntu",
"severity": 5,
"facility": 1,
"facility_label": "user-level",
"severity_label": "Notice",
"event_time": "2015-09-14 14:23:16 UTC"
}
}
我怎样才能通过`
从现在到现在
in this query if timestamp in"timestamp": "Sep 14 06:19:10"` 这个格式请大家帮帮我。
【问题讨论】:
-
索引时时间戳字段的格式是什么,是否有日期类型的映射?
-
@keety 这是logstash数据所以我不知道。
标签: ruby json elasticsearch