Skip to content

Commit e60412d

Browse files
committed
iter
1 parent c6bddfc commit e60412d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ private CreateIndexRequest mapping(String type, Map<String, ?> source) {
289289
if (source.isEmpty()) {
290290
// If no source is provided we return empty mappings
291291
return mapping(EMPTY_MAPPINGS);
292-
} else if (source.size() == 1 && source.containsKey("properties")) {
292+
} else if (source.size() == 1 && source.containsKey("properties") && ((Map) source.get("properties")).isEmpty()) {
293+
// TODO-MP change if clause
293294
// return empty mapping if source is only "empty" properties
294295
return mapping(EMPTY_MAPPINGS);
295296
} else if (source.size() != 1 || source.containsKey(type) == false) {

0 commit comments

Comments
 (0)