Does Tag cloud support arrays as an input?

Hi,

I'm interested to know if I can give an array of string as an input to a tag cloud visualization?

I expect Kibana then to consider each individual item of this array for each document, as an individual input. For example:

doc1.fieldX = [dog, cat, fox]
doc2.fieldX = [sheep, cow, dog]
doc3.fieldX = [mouse, dog, cow]

the counts for each value in the tag cloud for fieldX as input:

dog = 3
cow = 2
cat, mouse, sheep, fox = 1

Thanks,
Ellie

Yes, the tag cloud visualization will work on fields that contain arrays of Keywords.

To verify this, I used Kibana dev tools to insert some documents into an index and then created a tag cloud. Dev tools is a great way to quickly experiment with the Elasticsearch API.

PUT example/_doc/1
{
    "fieldX" :  ["dog", "cat", "fox"]
}

PUT example/_doc/2
{
    "fieldX" :  ["sheep", "cow", "dog"]
}

PUT example/_doc/3
{
    "fieldX" :  ["mouse", "dog", "cow"]
}

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.