diff --git a/src/main/java/org/elasticsearch/rest/action/admin/indices/settings/RestGetSettingsAction.java b/src/main/java/org/elasticsearch/rest/action/admin/indices/settings/RestGetSettingsAction.java index c7b53376f39..09140f2f7fb 100644 --- a/src/main/java/org/elasticsearch/rest/action/admin/indices/settings/RestGetSettingsAction.java +++ b/src/main/java/org/elasticsearch/rest/action/admin/indices/settings/RestGetSettingsAction.java @@ -73,7 +73,8 @@ public class RestGetSettingsAction extends BaseRestHandler { MetaData metaData = response.getState().metaData(); if (metaData.indices().isEmpty()) { - channel.sendResponse(new XContentThrowableRestResponse(request, new IndexMissingException(new Index(indices[0])))); + String indexName = indices.length == 0 ? "_all" : indices[0]; + channel.sendResponse(new XContentThrowableRestResponse(request, new IndexMissingException(new Index(indexName)))); return; }