elasticsearch 如何识别索引的时间域?
是否有es查询或某种方式询问Elasticsearch哪个字段用作特定索引的时间字段?您可以使用Kibana选择正确的时间字段(步骤5):elasticsearch 如何识别索引的时间域?,elasticsearch,kibana,elasticsearch,Kibana,是否有es查询或某种方式询问Elasticsearch哪个字段用作特定索引的时间字段?您可以使用Kibana选择正确的时间字段(步骤5): curl 'http://localhost:9200/your_index/_search?pretty' { "took" : 2, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits"
curl 'http://localhost:9200/your_index/_search?pretty'
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [
{
"_index" : "your_index",
"_type" : "your_index",
"_id" : "logstash-01.kvm.local",
"_score" : 1.0,
"_source" : {
"@timestamp" : "2018-11-10T18:03:22.822Z",
"host" : "logstash-01.kvm.local",
"@version" : "1",
"clock" : 558753,
"type" : "your_index"
}
}
]
}
}
curl 'http://localhost:9200/your_index/_search?pretty'
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [
{
"_index" : "your_index",
"_type" : "your_index",
"_id" : "logstash-01.kvm.local",
"_score" : 1.0,
"_source" : {
"@timestamp" : "2018-11-10T18:03:22.822Z",
"host" : "logstash-01.kvm.local",
"@version" : "1",
"clock" : 558753,
"type" : "your_index"
}
}
]
}
}
嘿,谢谢你的详尽回答。关于通过Kibana手动检查的第一部分,我实际上需要一种通过代码检查的方法。通过curl的后一个建议,如果有多个日期字段,但我只使用其中一个作为索引时间字段,因为只允许使用一个,该怎么办?