]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8798 prepare for type change of ES property "norms"
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Wed, 28 Jun 2017 08:58:19 +0000 (10:58 +0200)
committerDaniel Schwarz <bartfastiel@users.noreply.github.com>
Wed, 9 Aug 2017 13:09:54 +0000 (15:09 +0200)
server/sonar-server/src/main/java/org/sonar/server/es/NewIndex.java

index 9120258cab573a3d36da162a197726026454ddb3..261251e1d136187e9ed54352e7d672121901cd89 100644 (file)
@@ -269,7 +269,9 @@ public class NewIndex {
         hash.putAll(ImmutableMap.of(
             "type", FIELD_TYPE_KEYWORD,
             "index", disableSearch ? INDEX_NOT_SEARCHABLE : INDEX_SEARCHABLE_FOR_KEYWORD,
-            "norms", ImmutableMap.of("enabled", String.valueOf(!disableNorms))));
+            "norms",
+            ImmutableMap.of("enabled", String.valueOf(!disableNorms)) // ES 5: replace with String.valueOf(!disableNorms)
+        ));
       } else {
         hash.put("type", "multi_field");
 
@@ -291,7 +293,9 @@ public class NewIndex {
             "type", FIELD_TYPE_KEYWORD,
             "index", INDEX_SEARCHABLE_FOR_KEYWORD,
             "term_vector", termVectorWithPositionOffsets ? "with_positions_offsets" : "no",
-            "norms", ImmutableMap.of("enabled", "false")));
+            "norms",
+            ImmutableMap.of("enabled", "false") // ES 5: replace with "false"
+        ));
 
         hash.put("fields", multiFields);
       }