I have an index pattern in my kibana with an array field. The array field contains variable number of strings in each document. I have to visualize the count of each string in all documents. I went through many articles, people recommend to use painless script in situations when we are trying to access array elements. But in my case I am unable to figure out what exactly should I do using painless because the size of array is not fixed so I can't extract array values in different variables.
Please Help me with this. Also suggest some other way of doing so apart from painless. Thanks in advance.