If types and index mappings are empty consider the mapping as an "empty" mapping and return status 200.
This commit is contained in:
parent
2c150419ce
commit
4d969add80
|
@ -117,6 +117,11 @@ public class RestGetMappingAction extends BaseRestHandler {
|
|||
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;
|
||||
}
|
||||
|
||||
builder.endObject();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue