diff --git a/server/src/main/java/org/elasticsearch/search/fetch/subphase/FieldFetcher.java b/server/src/main/java/org/elasticsearch/search/fetch/subphase/FieldFetcher.java index b8848b2883593..4f1d24e6d6d9c 100644 --- a/server/src/main/java/org/elasticsearch/search/fetch/subphase/FieldFetcher.java +++ b/server/src/main/java/org/elasticsearch/search/fetch/subphase/FieldFetcher.java @@ -73,12 +73,6 @@ public static FieldFetcher create( for (String field : context.getMatchingFieldNames(fieldPattern)) { MappedFieldType ft = context.getFieldType(field); - // NOTE: fields that are not allowed for security reasons behave as if they are unmapped. - // In that case we do not expect to return values for those fields so the ValueFetcher - // is not needed. - if (ft == null) { - continue; - } if ("_size".equals(field) && includeSizeMetadataField == false) { continue; }