Unable to use scripted fields with Kibana 7.2

We recently upgraded from Kibana 6.5.1 to 7.2. I'm having very strange behavior with my scripted fields. I'm unable to view any of my searches on the Discover tab. I get an error that states "1 of 161 shards failed", but when I go to my dashboard everything displays as expected.

I deleted my scripted fields and received the error below during the delete. When I went back to the Discover tab, my searches started working. I am not using the toLowerCase function in my scripted fields.

Version: 7.2.0
Build: 24337
Error: Uncaught TypeError: (filter || "").toLowerCase is not a function (https:{servername}/built_assets/dlls/vendors.bundle.dll.js.233) at window.onerror (https://{servername}/bundles/commons.bundle.js:3:1630366)

Any ideas?

Could you provide the script that you're using as well as a sample of what your data/scripted field looks like?

def statusStr = doc['mdc.responseHttpStatus.keyword'].value;
if(statusStr != null && statusStr != "")
{
def status = Integer.parseInt(statusStr);
if(status >= 200 && status < 300)
{
return "Success";
}
else
{
return "Failed";
}
}

It worked fine in 6.5.1.

I want to return Success if it was a successful http code and Failed if it was not. I'm using this for a metric visualization.

Has anyone else had issues with scripted fields in Kibana 7.2?

1 Like

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