From 25717ab2536b91fab710df595c841d7e6ee0e523 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Sat, 3 Nov 2012 23:44:23 +0100 Subject: [PATCH] lucene 4: only omit_norms on non analyzed field if boost is not set --- .../org/elasticsearch/index/mapper/core/StringFieldMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/index/mapper/core/StringFieldMapper.java b/src/main/java/org/elasticsearch/index/mapper/core/StringFieldMapper.java index a131e3dc99a..077b3510047 100644 --- a/src/main/java/org/elasticsearch/index/mapper/core/StringFieldMapper.java +++ b/src/main/java/org/elasticsearch/index/mapper/core/StringFieldMapper.java @@ -120,7 +120,7 @@ public class StringFieldMapper extends AbstractFieldMapper implements Al // index options, as probably what the user really wants // if they are set explicitly, we will use those values if (fieldType.indexed() && !fieldType.tokenized()) { - if (!omitNormsSet) { + if (!omitNormsSet && boost == Defaults.BOOST) { fieldType.setOmitNorms(true); } if (!indexOptionsSet) {