Hi everyone.
I'll keep it simple: Scripts in Groovy doesn't work when making iterations on arrays.
The mapping:
{
"Xxx" : {
"mappings" : {
"node" : {
"properties" : {
"id" : {
"type" : "double"
},
"searchTags" : {
"type" : "nested",
"properties" : {
"id" : {
"type" : "double"
},
"packages" : {
"type" : "double"
}
}
}
}
}
}
}
}
The following scripts are part of a bigger query, I've removed the rest so we can focus on this simple script that fails.
This doesn't work:
return doc['searchTags.packages'].every { it == 1.0 }
but this works:
return doc['searchTags.packages'].count() > 0
All scripts that contains an iteration seems to fail. I'm using Elastic Search 2.2.0.0
I've attached a snippet of the stacktrace.