@Helt 可能是es-spark不支持聚合。下面是我找到一个帖子的原话:I discussed with Elastic yesterday and learnt that count(*) or any other form of aggregation is not pushed down by ES for Spark.They recommended to use the Java REST API within Spark code for aggregations.
spark 使用elasticsearch-spark connector读取ES 跳坑记录背景:我们希望将es中的数据通过elasticsearch-hadoop、或是elasticsearch-sparkconnector将其映射成hive\spark-sql ...