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.
Thanks Wylie, it helps a bit.
I tried to change my data source ;
my data source is now:
PUT /discuss_test4/_doc/1
{
"Tableau_test":[
{ "mode":"Moto", "nombre" : 1},
{ "mode":"Voiture", "nombre" : 2},
{ "mode":"Vélo", "nombre" : 3},
{ "mode":"Marche", "nombre" : 4}
]
}
But I am still failing to get a visualisation in Kibana showing the below:
Marche 4
Velo 3
Voiture 2
Moto 1
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.