]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5174 Fix hasDebtCharacteristic filter
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 28 Mar 2014 16:17:20 +0000 (17:17 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 28 Mar 2014 16:17:20 +0000 (17:17 +0100)
sonar-server/src/main/java/org/sonar/server/rule/RuleRegistry.java

index c4339caecb2a144693d92f574757c62cef261c01..ae687d6fe686a0ca7dbe1a4c8d11f5bba7f854b4 100644 (file)
@@ -154,9 +154,9 @@ public class RuleRegistry {
     }
     if (query.hasDebtCharacteristic() != null) {
       if (Boolean.TRUE.equals(query.hasDebtCharacteristic())) {
-        mainFilter.must(FilterBuilders.missingFilter(RuleDocument.FIELD_CHARACTERISTIC_KEY));
+        mainFilter.must(FilterBuilders.existsFilter(RuleDocument.FIELD_CHARACTERISTIC_KEY));
       } else {
-        mainFilter.mustNot(FilterBuilders.missingFilter(RuleDocument.FIELD_CHARACTERISTIC_KEY));
+        mainFilter.mustNot(FilterBuilders.existsFilter(RuleDocument.FIELD_CHARACTERISTIC_KEY));
       }
     }