]> source.dussan.org Git - sonarqube.git/commitdiff
Omit lucene norms on non-analyzed string fields
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 28 Nov 2014 15:55:34 +0000 (16:55 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 28 Nov 2014 15:55:34 +0000 (16:55 +0100)
server/sonar-server/src/main/java/org/sonar/server/es/NewIndex.java

index fb2f531099b60d4ac50c88f6dde90a4aae9d8373..9dc4caab60cc7937ab19d8bcfdcef72ab05d8c77 100644 (file)
@@ -121,9 +121,10 @@ public class NewIndex {
    * Helper to define a string field in mapping of index type
    */
   public static class StringFieldBuilder {
-    private static final ImmutableMap<String, String> NOT_ANALYZED = ImmutableSortedMap.of(
+    private static final ImmutableMap NOT_ANALYZED = ImmutableSortedMap.of(
       "type", "string",
-      "index", "not_analyzed");
+      "index", "not_analyzed",
+      "omit_norms", "true");
 
     private final NewIndexType indexType;
     private final String fieldName;