0
我想在elasticsearch中整理我的數據並使用kibana將其可視化。我使用elasticsearch 1.4.4和Kibana3。在elasticsearch中啓用默認時間戳
我的所有數據的elasticsearch是bits
,我有兩種文檔類型aaaa
和bbbb
。我在開始處運行下面的腳本,並預期格式爲yyyy-MM-dd HH:mm:ss
的時間戳字段的值爲插入文檔的時間。我的理解是每個文檔都有一個時間戳字段。我無法在kibana中看到這個領域。 Kibana的確說 mappings._default_._timestamp.enabled
但是我似乎無法將其設置爲我的儀表板的index
時間戳。我在這裏做錯了什麼。
curl -XPOST localhost:9200/bits -d '{
"settings" : {
"number_of_shards" : 2
},
"mappings" : {
"_default_":{
"_timestamp" : {
"enabled" : true,
"store" : true,
"path" : "post_date",
"format" : "yyyy-MM-dd HH:mm:ss"
}
}
}
}'
curl -XPOST localhost:9200/bits/aaaa -d '{
"settings" : {
"number_of_shards" : 2
},
"mappings" : {
"_default_":{
"_timestamp" : {
"enabled" : true,
"store" : true,
"path" : "post_date",
"format" : "yyyy-MM-dd HH:mm:ss"
}
}
}
}'
curl -XPOST localhost:9200/bits/bbbb -d '{
"settings" : {
"number_of_shards" : 2
},
"mappings" : {
"_default_":{
"_timestamp" : {
"enabled" : true,
"store" : true,
"path" : "post_date",
"format" : "yyyy-MM-dd HH:mm:ss"
}
}
}
}'
我正在使用上面提到的Kibana3和elasticsearch 1.4.4。 – liv2hak 2015-03-31 20:45:54