Kibana Scripted Field

def path = doc['Extra_Data.keyword'].value;
def ls=[];
if(path.endsWith('L 9')) {
if (ls !=null){
 def x = ls.get(0);
 return "x";
return "y";

i got this error .
why my scripted field is not working?
I would love to know your suggestion.
and Do you know why some of groovy syntax is not working in scripted field?

Thank You

Hi there,

Could you give me some more context on "is not working"? Are you getting an error or is the field just not evaluating to what you would expect? Have you tried using the built-in script testing tool in the scripted fields editor to test your changes?

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