From 2dddcd9ba245e3229e9f5616d99749b4f57d5376 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 29 Nov 2016 10:56:49 +0100 Subject: [PATCH] Slight performance improvement in api/rules/tags No need to load the rule documents. Only the aggregation of tags is used. --- .../src/main/java/org/sonar/server/rule/index/RuleIndex.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java b/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java index 626f0ef3499..20405f59bf1 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java +++ b/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java @@ -482,6 +482,7 @@ public class RuleIndex extends BaseIndex { SearchRequestBuilder request = getClient() .prepareSearch(INDEX) .setQuery(matchAllQuery()) + .setSize(0) .addAggregation(termsAggregation); SearchResponse esResponse = request.get(); -- 2.39.5