My scripted field works as intended in older version of kibana 5.x, but we use 7.x in a different environment and the same scripted field does not work. I've searched for what the syntax change would be in 7.x but couldn't find anything. Can anybody help me? Here is the scripted field statement. Note that the same statement below works fine when it's not a nested field.
Thanks for clarifying. This is caused by a breaking change in 7.0 version - The doc['field'].value will throw an exception if the document is missing a value for the field.
You can fix it by prepending:
Thanks Marta, I tried the above, but it doesn't return any values when there is a value for my field, and no exception message this time either.
In your above example, do I need to put an else after the first line or is the else implied?
Yup the field appears in discover and is part of the process document and it shows a value, but not when I try to display it inside of a scripted field. I tried your suggestion above but I'm not getting a value to display.
Hi @Marta_Bondyra , any other suggestions that I could try? Can you point me to the documentation about the breaking change in 7.0? All the links that people posted on other threads about the breaking change throw 404 errors.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.