Hi, I am new in Kibana .So I added a scripted field in one of the index pattern. I am pretty sure the code should work fine.
When I previewed the results, it works fine. However, when I tried to view it in Discover, it said "error loading data, [script_exception] runtime error".
Below error from the discover