Some time ago I fought scripted fields in this post: Painless doc values; how to reference grouped fields
Now scripted fields are deprecated and I'm trying to convert this to a runtime field. I'm using the KIbana component index to create a runtime field. I copied the script over as is and it won't create. I dropped to just the first line, getting the same error:
if (doc[winlog.user_data.FilePath'].size() == 0) {
return ''
}
Results in a pretty useless error:
Unable to create component template
Failed to parse mapping [_doc]: compile error
Any ideas? Has anyone seen any examples of runtime fields referencing grouped fields? I don't see any doc in the Kibana guide for the entire Stack Management section.
Thanks