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");

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 (<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.


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


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?


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.

Bala Melangi

What version of Kibana are you on?


Elastic Stack v7.8.0


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.

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.