Get mapping with no index specified on an empty cluster returns 404, closes #1976.

This commit is contained in:
Shay Banon 2012-05-24 00:58:11 +02:00
parent 3bf55a0858
commit 7b2e1b7b4f
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ public class RestGetMappingAction extends BaseRestHandler {
builder.endObject();
channel.sendResponse(new XContentRestResponse(request, foundAny ? OK : NOT_FOUND, builder));
channel.sendResponse(new XContentRestResponse(request, foundAny || indices.length == 0 ? OK : NOT_FOUND, builder));
} catch (Exception e) {
onFailure(e);
}