You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ta...@apache.org on 2019/08/28 01:57:01 UTC
[skywalking] branch master updated: set alarm record ordered by
start time desc. (#3353)
This is an automated email from the ASF dual-hosted git repository.
tanjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new cadaab0 set alarm record ordered by start time desc. (#3353)
cadaab0 is described below
commit cadaab03ae4f01aa983f3f3f157253f17719adc0
Author: Jared Tan <ji...@daocloud.io>
AuthorDate: Wed Aug 28 09:56:55 2019 +0800
set alarm record ordered by start time desc. (#3353)
---
.../oap/server/storage/plugin/elasticsearch/query/AlarmQueryEsDAO.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/AlarmQueryEsDAO.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/AlarmQueryEsDAO.java
index 3c0a304..4a3f525 100644
--- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/AlarmQueryEsDAO.java
+++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/AlarmQueryEsDAO.java
@@ -30,6 +30,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.index.query.*;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.builder.SearchSourceBuilder;
+import org.elasticsearch.search.sort.SortOrder;
/**
* @author peng-yongsheng
@@ -57,7 +58,7 @@ public class AlarmQueryEsDAO extends EsDAO implements IAlarmQueryDAO {
boolQueryBuilder.must().add(QueryBuilders.matchPhraseQuery(matchCName, keyword));
}
- sourceBuilder.query(boolQueryBuilder);
+ sourceBuilder.query(boolQueryBuilder).sort(AlarmRecord.START_TIME, SortOrder.DESC);
sourceBuilder.size(limit);
sourceBuilder.from(from);