I am using the following ruby code but getting an exception about "ruby exception undefined method between? for nil:Nilclass"?
event.set("[weekInMonth]", 2) if event.get("[tempDay]").between?(8, 15)
What should I change this to? I am trying to use this for multiple things.
That suggests that some events do not have a tempDay field.
Is there any way to modify the ruby so it does not give the error. For example, if nil then skip.
code => ' t = event.get("[tempDay]") if t event.set("[weekInMonth]", 2) if t.between?(8, 15) end '
© 2020. All Rights Reserved - Elasticsearch
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.