Skip to content

Commit d93c087

Browse files
committed
add comment
1 parent ff35567 commit d93c087

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,14 @@ public void onFailure(final Exception e) {
132132
};
133133
}
134134

135+
/**
136+
* We're using the Get Settings API here to resolve the authorized indices for the user.
137+
* This is because the Cluster State and Cluster Health APIs do not filter output based
138+
* on index privileges, so they can't be used to determine which indices are authorized
139+
* or not. On top of this, the Indices Stats API cannot be used either to resolve indices
140+
* as it does not provide information for all existing indices (for example recovering
141+
* indices or non replicated closed indices are not reported in indices stats response).
142+
*/
135143
private void sendGetSettingsRequest(final String[] indices,
136144
final IndicesOptions indicesOptions,
137145
final boolean local,

0 commit comments

Comments
 (0)