Hi,
I am using dynamic scripting with groovy in Elasticsearch 2.4.4. The script gives a compilation error, whereas the same script was working fine in Elasticsearch 2.1.1. I have verified the script complies fine in a groovy console.
The script works if the cast is removed but I would like to understand if there is any restriction in using the LinkedHashMap in groovy in 2.4.4, as I am aware that from 5.0 some restriction is made for security.
Error:
caused_by":{"type":"script_exception","reason":"Error compiling script b065d53a6f4fa2969360ce7776fc0abfa1cd1f21","caused_by":{"type":"multiple_compilation_errors_exception","reason":"startup failed:\nb065d53a6f4fa2969360ce7776fc0abfa1cd1f21: 28: unable to resolve class LinkedHashMap
_Code Snippet:
if (!found) {
target.paths.add((LinkedHashMap)source);
}_
Any help in this regard is greatly appreciated.
Thanks!
Parvathy.