I have a closure object in a groovy script that I'm trying to port to painless. What is the proper syntax to do this?
closure object is something like:
> def myClosure
> myClosure = { oneMap, otherMap ->
> ...
> [output 1, output2]
> }
> outputList = myClosure(inMap1, inMap2)
rjernst
(Ryan Ernst)
July 19, 2017, 6:12pm
2
Painless does not have closures like groovy. Lambdas are just like in java: they are an anonymous implementation of a functional interface. Here I think you are looking for functions: https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-syntax.html#functions
system
(system)
Closed
August 16, 2017, 6:12pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.