Scripted Field Problem in Kibana


I am new to scripted field in Kibana. Kindly find my below mentioned code. This code is always returning "Message is Null" though I can find value for "message" field in Kibana. Can you please help me to resolve this issue?

**************************** CODE **************************

def message = doc['message.keyword'].value;

if (message!=null)
return "Message is Not Null";
return "Message is Null";
return "There is no field";

Thanks in Advanced...

Debashis Adak

@Debashis_Adak I just tested your script and it's working for me. Are you sure the name of your field is message.keyword? I would try simplifying the script to test each piece at a time. First try just returning the contents of message.keyword and see what you get.

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