diff --git a/src/main/java/org/elasticsearch/index/mapper/internal/SizeFieldMapper.java b/src/main/java/org/elasticsearch/index/mapper/internal/SizeFieldMapper.java index f6203ef21c2..de1fbb8a87f 100644 --- a/src/main/java/org/elasticsearch/index/mapper/internal/SizeFieldMapper.java +++ b/src/main/java/org/elasticsearch/index/mapper/internal/SizeFieldMapper.java @@ -137,6 +137,9 @@ public class SizeFieldMapper extends IntegerFieldMapper implements RootMapper { if (!enabled) { return null; } + if (context.flyweight()) { + return null; + } return new CustomIntegerNumericField(this, context.source().length()); }