未验证 提交 cadaab03 编写于 作者: J Jared Tan 提交者: GitHub

set alarm record ordered by start time desc. (#3353)

上级 a3241f0a
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册