What you showed in your example is a single document with an array field, which gets to the core of how Lucene (which is underneath Elasticsearch) represents data.
This visualizations is showing the right thing- it shows that there is a single document that contains each value.
The "cardinality" aggregation is based on unique documents, so to get the behavior you were expecting, I would recommend indexing more than one document.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.