type date in ES6-timestream cannot be sorted on
Query bellow returns error: {{{ curl -XGET -H 'Content-Type: application/json' 'http://cmsos-iaas-bril.cms:9200/bril-bestlumi/_search?pretty' -d '{ "query": { "match_all": {} }, "size": 1, "sort": [ { "timestamp": { "order": "desc" } } ] }' }}}
{{{ "Can't load fielddata on [timestamp] because fielddata is unsupported on fields of type [date]. Use doc values instead." }}}
The mapping for this field is: {{{ "timestamp" : { "type" : "date", "index" : false, "doc_values" : false, "format" : "yyyy-MM-dd'T'HH:mm:ss'Z'" } }}}
We did simple test creating similar index with field of type data with the following mapping: {{{ "timestamp" : { "type" : "date", "index" : false, "doc_values" : true, "format" : "yyyy-MM-dd'T'HH:mm:ss'Z'" } }}}
The query works.
We need all the fields with data type to be sortable (essential for time series chart). Can we change "doc_values" to true for type date? Or any other suggestions to make date fields sortable?
thanks, Zhen&Jonas