File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
server/src/main/java/org/elasticsearch/cluster/metadata Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,11 @@ public static boolean isIndexVisible(
156156 final boolean isHidden = indexAbstraction .isHidden ();
157157 boolean isVisible = isHidden == false || indicesOptions .expandWildcardsHidden () || isVisibleDueToImplicitHidden (expression , index );
158158 if (indexAbstraction .getType () == IndexAbstraction .Type .ALIAS ) {
159- if (indexAbstraction .isSystem ()) {
159+ // it's an alias, ignore expandWildcardsOpen and expandWildcardsClosed.
160+ // it's complicated to support those options with aliases pointing to multiple indices...
161+ isVisible = isVisible && indicesOptions .ignoreAliases () == false ;
162+
163+ if (isVisible && indexAbstraction .isSystem ()) {
160164 // check if it is net new
161165 if (resolver .getNetNewSystemIndexPredicate ().test (indexAbstraction .getName ())) {
162166 // don't give this code any particular credit for being *correct*. it's just trying to resolve a combination of
@@ -182,9 +186,6 @@ public static boolean isIndexVisible(
182186 }
183187 }
184188
185- // it's an alias, ignore expandWildcardsOpen and expandWildcardsClosed.
186- // complicated to support those options with aliases pointing to multiple indices...
187- isVisible = isVisible && indicesOptions .ignoreAliases () == false ;
188189 if (isVisible && selectorString != null ) {
189190 // Check if a selector was present, and if it is, check if this alias is applicable to it
190191 IndexComponentSelector selector = IndexComponentSelector .getByKey (selectorString );
You can’t perform that action at this time.
0 commit comments