Just started learning Elasticsearch today , I am trying to find a single query which can give the expected result.
Can someone please help me with the query ?
Thanks in advance
You need to copy all of the country_iso fields into a single field, then run an aggregation on that field.
Example below. (I assume that country_iso isn't the only field that you will have under events etc, and that you will want to be able to query each object under events independently, so I have made them nested fields instead of object fields. You can read more about this distinction here: https://www.elastic.co/guide/en/elasticsearch/reference/5.4/nested.html)
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.