aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/java
diff options
context:
space:
mode:
authorStephane Gamard <stephane.gamard@searchbox.com>2014-05-01 15:20:52 +0200
committerStephane Gamard <stephane.gamard@searchbox.com>2014-05-01 15:20:52 +0200
commitbbfbe368e249720fc4f7f1a507537339dd03e8d0 (patch)
treef294da31bb2cc1d3b3ccfeb4eeadcbb48242283d /sonar-server/src/main/java
parent5d283315c8c750c85e120e3f98f1fd1c19a46c5e (diff)
downloadsonarqube-bbfbe368e249720fc4f7f1a507537339dd03e8d0.tar.gz
sonarqube-bbfbe368e249720fc4f7f1a507537339dd03e8d0.zip
SONAR-5237 - Passing Test for RuleStatus in RuleSearchMediumTest
Diffstat (limited to 'sonar-server/src/main/java')
-rw-r--r--sonar-server/src/main/java/org/sonar/server/rule2/RuleIndex.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/sonar-server/src/main/java/org/sonar/server/rule2/RuleIndex.java b/sonar-server/src/main/java/org/sonar/server/rule2/RuleIndex.java
index f43505a867b..856391b4e5e 100644
--- a/sonar-server/src/main/java/org/sonar/server/rule2/RuleIndex.java
+++ b/sonar-server/src/main/java/org/sonar/server/rule2/RuleIndex.java
@@ -130,6 +130,13 @@ public class RuleIndex extends BaseIndex<RuleKey, RuleDto> {
.endObject();
}
+ private void addFindField(XContentBuilder mapping, String field, String type) throws IOException {
+ mapping.startObject(field)
+ .field("type", type)
+ .field("index", "analyzed")
+ .endObject();
+ }
+
@Override
protected XContentBuilder getMapping() throws IOException {
XContentBuilder mapping = jsonBuilder().startObject()
@@ -140,6 +147,7 @@ public class RuleIndex extends BaseIndex<RuleKey, RuleDto> {
addMatchField(mapping, RuleField.KEY.key(), "string");
addMatchField(mapping, RuleField.REPOSITORY.key(), "string");
addMatchField(mapping, RuleField.SEVERITY.key(), "string");
+ addMatchField(mapping, RuleField.STATUS.key(), "string");
mapping.startObject(RuleField.NAME.key())
.field("type", "multi_field")