From b9f82b90b673ff23e28318e64554ac40e5b3a88f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lievremont Date: Mon, 1 Dec 2014 10:48:01 +0100 Subject: [PATCH] SONAR-5801 Use short instead of int in ES source line index (size optim) --- .../source/index/SourceLineIndexDefinition.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineIndexDefinition.java b/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineIndexDefinition.java index 1dc0f1e202f..6db9156df57 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineIndexDefinition.java +++ b/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineIndexDefinition.java @@ -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); } } -- 2.39.5