嗨,我正试图通过sql查询对弹性搜索进行查询,我希望使用Java实现相同的逻辑。select mimetype,count(*) from table group by mimetype SearchResponse responseresponse.getAggregations().get("mimetype");
Collection<Terms.Bucket> buckets = terms.
我研究了elasticsearch聚合查询,但找不到它是否支持多个聚合函数。换句话说,我想知道elasticsearch是否可以生成与这个Sql聚合查询等价的内容:
SELECT account_no, transaction_type, count(account_no), sum(amount), max(amount) FROM index_name GROUP BY account_no, transaction_type Having count(account_no