FYI. The data is being indexed to elasticsearch from Spark dataframe.
Putting date data directly in Kibana, and querying, return date as String.
Elasticsearch 6.8/Kibana date field query always returns long value, not string.
Index mapping:
PUT sp_date_test_2020?include_type_name=true
{
"settings": {
"number_of_shards": 1
},
"mappings": {
"_doc": {
"properties": {
"test_date":{
"type": "date"
},
"year": { "type": "integer"}
}
}
}
}
All query hits return values like:
"test_date" : 2493400000000
I would like the dates to return as string values "2010-08-09"
Thanks
I have a fix. In the dateframe cast the date column to string prior to indexing.
Behaves as expected now.