vernedeng commented on code in PR #9057: URL: https://github.com/apache/inlong/pull/9057#discussion_r1378737518
########## inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AuditServiceImpl.java: ########## @@ -295,18 +298,21 @@ public List<AuditVO> listByCondition(AuditRequest request) throws Exception { LOGGER.warn("elasticsearch index={} not exists", index); continue; } - SearchResponse response = elasticsearchApi.search(toAuditSearchRequest(index, groupId, streamId)); - final List<Aggregation> aggregations = response.getAggregations().asList(); - if (CollectionUtils.isNotEmpty(aggregations)) { - ParsedTerms terms = (ParsedTerms) aggregations.get(0); - if (CollectionUtils.isNotEmpty(terms.getBuckets())) { - List<AuditInfo> auditSet = terms.getBuckets().stream().map(bucket -> { + JsonObject response = elasticsearchApi.search(index, toAuditSearchRequestJson(groupId, streamId)); + JsonObject aggregations = response.getAsJsonObject("aggregations").getAsJsonObject("log_ts"); Review Comment: make these field name as constants -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@inlong.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org