How to sort the scripted number fields on search results?

We are using Kibana for showing visualizations for the data from ElasticSearch. We have created scripted fields using existing number fields however when we save a search result on dashboard and sort the scripted field, it doesnt sort it. Please advice in this case.


Looks like this is a bug. You can track updates here:

Thanks Lukas, will track this thread. but is there any work around which can be tried till this fix is applied just for time being?