I am using elasticsearch 2.1.2 version and Kibana 4.2.2 version.
I had a index in ES using below:
curl -XPUT http://localhost:9200/abc/tbl/_mapping -d'{
"tbl": {
"_timestamp": {
"enabled": true
},
"_all": {
"store": true
},
"properties": {
"name": {
"type": "string",
"index": "not_analyzed"
},
"num": {
"type": "long"
},
"date": {
"type": "date",
"format": "yyyy-MM-dd"
}
}
}
}'
and it is having indexed data and also data is mapped to Kibana. Please see snapshot:
I had a date field (as name and num) but there is no data in it. Now I added some data and following your query output is:
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 5,
"max_score" : 1.0,
"hits" : [ {
"_index" : "abc",
"_type" : "tbl",
"_id" : "5743dd5087675117e31d9529",
"_score" : 1.0,
"_timestamp" : 1464065500396,
"_source":{"date": "2016-01-17", "num": 25.0, "name": "xyz"}
}, {
"_index" : "abc",
"_type" : "tbl",
"_id" : "5743dd8887675117e31d952c",
"_score" : 1.0,
"_timestamp" : 1464065500396,
"_source":{"date": "2016-03-04", "num": 23.0, "name": "abc"}
} ]
}
}
In kibana I used date as date field and it is shown in screenshot shared previously.
Also I know _timestamp field is depricated but using ES mapping I forced it to have a value which is shown in ouput.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.