diff --git a/src/main/java/org/elasticsearch/rest/action/admin/indices/mapping/get/RestGetMappingAction.java b/src/main/java/org/elasticsearch/rest/action/admin/indices/mapping/get/RestGetMappingAction.java index 42818aeb20f..3aa662a0a00 100644 --- a/src/main/java/org/elasticsearch/rest/action/admin/indices/mapping/get/RestGetMappingAction.java +++ b/src/main/java/org/elasticsearch/rest/action/admin/indices/mapping/get/RestGetMappingAction.java @@ -116,10 +116,10 @@ public class RestGetMappingAction extends BaseRestHandler { builder.field(mappingMd.type()); builder.map(mappingMd.sourceAsMap()); } - + if (indexMetaData.mappings().values().isEmpty() && types.isEmpty()) { // if no types are specified and no mappings are set for the index, consider this an empty mapping - foundAny = true; + foundAny = true; } builder.endObject();