From fd74a7d27428ea3ea246bbc8aceb05b6f85b9547 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Fri, 28 Mar 2014 17:17:20 +0100 Subject: [PATCH] SONAR-5174 Fix hasDebtCharacteristic filter --- .../src/main/java/org/sonar/server/rule/RuleRegistry.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); } } -- 2.39.5