aderm commented on a change in pull request #4292: Improve ES query performance
URL: https://github.com/apache/skywalking/pull/4292#discussion_r373367392
 
 

 ##########
 File path: 
oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/base/EsDAO.java
 ##########
 @@ -41,7 +41,7 @@ public EsDAO(ElasticSearchClient client) {
     protected final void queryBuild(SearchSourceBuilder sourceBuilder, Where 
where, long startTB, long endTB) {
         RangeQueryBuilder rangeQueryBuilder = 
QueryBuilders.rangeQuery(Metrics.TIME_BUCKET).gte(startTB).lte(endTB);
         if (where.getKeyValues().isEmpty()) {
-            sourceBuilder.query(rangeQueryBuilder);
+            
sourceBuilder.query(QueryBuilders.boolQuery().filter(QueryBuilders.boolQuery().filter(rangeQueryBuilder)));
 
 Review comment:
   oops, replaced twice

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to