Error: Unsupported script sort type: date at castSortType

@here I added my scripted field in kibana.

SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");
f.setTimeZone(TimeZone.getTimeZone("America/Chicago"));
f.parse(doc['starttime.keyword'].value); 

Even Added my field as date but it throws an error.
Unsupported script sort type: date Error: Unsupported script sort type: date at castSortType (https://x.x.x.x/31997/bundles/plugin/data/data.plugin.js:19:342197) at normalize (https://x.x.x.x/31997/bundles/plugin/data/data.plugin.js:19:341757) at https://x.x.x.x/31997/bundles/plugin/data/data.plugin.js:19:341061 at Array.map (<anonymous>) at normalizeSortRequest (https://x.x.x.x/31997/bundles/plugin/data/data.plugin.js:19:341030) at SearchSource.mergeProp (https://x.x.x.x/31997/bundles/plugin/data/data.plugin.js:6:97214) at https://x.x.x.x/31997/bundles/plugin/data/data.plugin.js:6:97680 at Array.forEach (<anonymous>) at SearchSource.mergeProps (https://x.x.x.x/31997/bundles/plugin/data/data.plugin.js:6:97586) at SearchSource.flatten (https://x.x.x.x/31997/bundles/plugin/data/data.plugin.js:6:98079)
So please help me how to fix.

Thanks.

@mattkime / @lukeelmers - can I please get some eyes on this please? Thanks!

Hello,

Can you please tell us where are you seeing the error - which part of Kibana and what are you doing when you are in there?

Thanks,
Bhavya

@here
When Changed to date type in scripted field using above script. I got error in


While I use time(time is scripted field) as Time Filter field name instead of logdate time I got this issue. This error I saw while I open Discover tab and visualize. Can any one fix.

Thanks,
Bala Melangi

What version of Kibana are you on?

@LeeDr

Elastic Stack v7.8.0

Thanks,

@LeeDr
Data converted as date type. When I assigned that value as Time Filter field, It throws error like above. I tested in discover and visualization. It throws above error. image
Above one is my scripted field and value.
Please help me here.

Thanks,
Bala Melangi

This issue was previously reported. I don't think there's any work-around at the moment.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.