I am new to ElasticSearch.
How do I simply get the equivalent to this SQL statement as a CSV formatted file:
SELECT field1, field2, COUNT(field3)
FROM MyTable
GROUP BY field1, field2
I am new to ElasticSearch.
How do I simply get the equivalent to this SQL statement as a CSV formatted file:
SELECT field1, field2, COUNT(field3)
FROM MyTable
GROUP BY field1, field2
You should have a look at aggregations and do something like a termsAgg on field1 add an inner termsAgg on field2.
That should give you something close to your needs.
© 2020. All Rights Reserved - Elasticsearch
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.