From: Julien Lancelot Date: Fri, 28 Mar 2014 16:17:20 +0000 (+0100) Subject: SONAR-5174 Fix hasDebtCharacteristic filter X-Git-Tag: 4.3~233 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fd74a7d27428ea3ea246bbc8aceb05b6f85b9547;p=sonarqube.git SONAR-5174 Fix hasDebtCharacteristic filter --- diff --git a/sonar-server/src/main/java/org/sonar/server/rule/RuleRegistry.java b/sonar-server/src/main/java/org/sonar/server/rule/RuleRegistry.java index c4339caecb2..ae687d6fe68 100644 --- a/sonar-server/src/main/java/org/sonar/server/rule/RuleRegistry.java +++ b/sonar-server/src/main/java/org/sonar/server/rule/RuleRegistry.java @@ -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)); } }