【发布时间】:2019-08-17 21:07:00
【问题描述】:
您能否建议我如何在 click house 中进行分页? Dor example 在弹性搜索中,我执行如下聚合查询。这里弹性搜索采用参数分区号和分区大小并给出结果。假设我们总共有 100 条记录,如果我们给分区大小 10 和分区号 2,那么我们将获得 11-20 条最新记录。
考虑到插入表格中的数据,我们如何在点击屋中做到这一点。
SearchResponse response = elasticClient.prepareSearch(index)
.setTypes(documentType)
.setQuery(boolQueryBuilder)
.setSize(0)
.addAggregation(AggregationBuilders.terms("unique_uids")
.field(Constants.UID_NAME)
.includeExclude(new IncludeExclude(partition,numPartitions))
.size(Integer.MAX_VALUE))
.get();
【问题讨论】:
标签: clickhouse