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.
if (doc['message.keyword'].value.contains('errCode')) {
return "match";
}
return "No match";
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".
Error: Bad Request
at Fetch._callee3$ (http://localhost:5601/bundles/commons.bundle.js:3:4001197)
at l (http://localhost:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:970406)
at Generator._invoke (http://localhost:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:970159)
at Generator.forEach.e.<computed> [as next] (http://localhost:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:970763)
at asyncGeneratorStep (http://localhost:5601/bundles/commons.bundle.js:3:3994720)
at _next (http://localhost:5601/bundles/commons.bundle.js:3:3995031)