]> source.dussan.org Git - sonarqube.git/commitdiff
Slight performance improvement in api/rules/tags
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 29 Nov 2016 09:56:49 +0000 (10:56 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 30 Nov 2016 12:30:23 +0000 (13:30 +0100)
No need to load the rule documents. Only the aggregation
of tags is used.

server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java

index 626f0ef34993a7dbcc5b0026e7b0c3665d2fa645..20405f59bf17c1fb0bee61d7c7407ec7fa74e8d1 100644 (file)
@@ -482,6 +482,7 @@ public class RuleIndex extends BaseIndex {
     SearchRequestBuilder request = getClient()
       .prepareSearch(INDEX)
       .setQuery(matchAllQuery())
+      .setSize(0)
       .addAggregation(termsAggregation);
 
     SearchResponse esResponse = request.get();