]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5801 Use short instead of int in ES source line index (size optim)
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 1 Dec 2014 09:48:01 +0000 (10:48 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 1 Dec 2014 09:48:07 +0000 (10:48 +0100)
server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineIndexDefinition.java

index 1dc0f1e202fc29031a5640d4353a429e4234789d..6db9156df57671921a48befdaa32d0e50082cf35 100644 (file)
@@ -79,9 +79,15 @@ public class SourceLineIndexDefinition implements IndexDefinition {
     sourceLineMapping.createDateTimeField(FIELD_SCM_DATE);
     sourceLineMapping.stringFieldBuilder(FIELD_HIGHLIGHTING).build();
     sourceLineMapping.stringFieldBuilder(FIELD_SOURCE).build();
-    sourceLineMapping.createIntegerField(FIELD_UT_LINE_HITS);
-    sourceLineMapping.createIntegerField(FIELD_UT_CONDITIONS);
-    sourceLineMapping.createIntegerField(FIELD_UT_COVERED_CONDITIONS);
+    sourceLineMapping.createShortField(FIELD_UT_LINE_HITS);
+    sourceLineMapping.createShortField(FIELD_UT_CONDITIONS);
+    sourceLineMapping.createShortField(FIELD_UT_COVERED_CONDITIONS);
+    sourceLineMapping.createShortField(FIELD_IT_LINE_HITS);
+    sourceLineMapping.createShortField(FIELD_IT_CONDITIONS);
+    sourceLineMapping.createShortField(FIELD_IT_COVERED_CONDITIONS);
+    sourceLineMapping.createShortField(FIELD_OVERALL_LINE_HITS);
+    sourceLineMapping.createShortField(FIELD_OVERALL_CONDITIONS);
+    sourceLineMapping.createShortField(FIELD_OVERALL_COVERED_CONDITIONS);
     sourceLineMapping.createDateTimeField(BaseNormalizer.UPDATED_AT_FIELD);
   }
 }