Can ElasticSearch aggregations do what SQL can do?
问题 In Elasticsearch I need get the frequency and the number of colors that occur the most frequent from the highest to lowest. If I have data like this: id|name ---------- 1|blue ---------- 2|blue ---------- 3|green ---------- 4|yellow ---------- 5|blue ---------- 6|yellow ---------- 7|purple ---------- 8|purple ---------- 9|purple I need to get the count of each color and then group by the count. So in the end, I would like all the colors that occurs the same number of times to be inside one