Using elasticsearch and watcher, I'm having the same issue as here:
However, using the proposed solution is not working, groovy.json.JSONOutput is not supported anymore. I opened an issue in the elastic repo.
There you can read deeply about the situation. Summarizing, watcher ctx.payload.hits is giving me a java.util.HashMap object and I need a json object.
Any other possible way to retrieve a json instead of a java.util.HashMap response from watcher ctx? Or do I have to program using groovy core a parser from HashMap to json?
Elasticsearch version: 2.3
JVM version: openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
OS version: centOS 7