0
我將一些數據放入Elasticsearch中以便在Kibana中對其進行可視化。我的目標是最大限度地避免Kibana中的腳本字段,因爲它們在計算上很昂貴。如何在Kibana和Elastisearch中從datetime中提取月份?
我想製作一個圖表,顯示X軸的月份和Y軸的計數。爲此,我需要將EventDate
格式化爲月份。什麼是最好的方式來做到這一點?
這是我PUT
聲明:
PUT /test
{
"mappings": {
"registry": {
"_source": {
"enabled": true
},
"_all": {
"enabled": true
},
"properties": {
"Id": {
"type":"text"
},
"Location": {
"type":"geo_point"
},
"Country": {
"type":"keyword"
},
"EventDate": {
"type":"date",
"format": "yyyy-MM-dd HH:mm:ss.SSS"
},
}
}
}
}
你可以把一些例子嗎?或者也許是一個網絡鏈接? – Dinosaurius
添加指向DateHistogramm聚合的鏈接。即將添加到正則表達式查詢。 – MartinSchulze