vernedeng commented on code in PR #9057:
URL: https://github.com/apache/inlong/pull/9057#discussion_r1473945009


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AuditServiceImpl.java:
##########
@@ -295,18 +302,23 @@ 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));

Review Comment:
   Is there any more elegent way to process json from es Api?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to