I wrote a function that returns an ArrayList from an expression passed in a parameter. The function is the first line of a stored script that is called from a watcher.
When testing the watcher that calls this stored script (with the function), it doesn't return at all and eventually times out. Without the function it returns quickly.
Is there anything that would explain this behavior within Kibana painless? The documentation is very light on functions.