聚合后如何获得最小日期?我按某个字段进行了聚合,然后subAggregation(AggregationBuilders.min("createdDate")
是这个日期,然后topHits
是 subAggregation。但它返回我 3 次点击,而不是 1 次这个值。
1 回答
0
只需使用size
TopHits 的属性并将其设置为 1。有关更多信息,请参阅https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-top-hits-aggregation.html#_options_2
于 2016-08-25T10:38:15.513 回答