I am trying to execute the following groovy script snippet in my elasticsearch dsl scripting:
[doc['availabilities.start'], doc['availabilities.end']].transpose().any { (start, end) -> end.date.getMillis() >= 11 } return 2;
```
and this throws the following error

I am pretty new in Groovy and unable to figure out what is the wrong syntax here. Any help will be appreciated.