I want to write a painless script which should return a dictionary. Basically, If I relate it to java, I want an output of Dictionary< String, List >.
So, I need to declare a Map and List in painless. Also, I need to add data to it (like map.add())
Can I have an example how would you declare a map and add data to it?
The examples at [painless] (https://www.elastic.co/guide/en/elasticsearch/painless/6.7/painless-examples.html) does not cover this.
I am using v6.7