Targeting a closed index (by itself or in a pattern with open indices) will fail in index resolution, irrespective of indices options.
FROM open_index,close_index OPTIONS "ignore_unavailable"="true","allow_no_indices"="true" will produce
[2024-03-28T18:32:49,106][DEBUG][o.e.x.e.a.EsqlResponseListener] [runTask-0] Request failed with status [FORBIDDEN]: org.elasticsearch.cluster.block.ClusterBlockException: index [close_index] blocked by: [FORBIDDEN/4/index closed];
at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.cluster.block.ClusterBlocks.indicesBlockedException(ClusterBlocks.java:221)
at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedException(ClusterBlocks.java:199)
at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedRaiseException(ClusterBlocks.java:192)
at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.action.fieldcaps.TransportFieldCapabilitiesAction.checkIndexBlocks(TransportFieldCapabilitiesAction.java:264)
at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.action.fieldcaps.TransportFieldCapabilitiesAction.doExecuteForked(TransportFieldCapabilitiesAction.java:144)
at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.action.fieldcaps.TransportFieldCapabilitiesAction.lambda$doExecute$0(TransportFieldCapabilitiesAction.java:116)
at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.action.ActionRunnable$4.doRun(ActionRunnable.java:100)
at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)
at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:984)
at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Comparatively, a _search with ignore_unavailable=true will work.
Description
Targeting a closed index (by itself or in a pattern with open indices) will fail in index resolution, irrespective of indices options.
FROM open_index,close_index OPTIONS "ignore_unavailable"="true","allow_no_indices"="true"
will producewhich will still fail with:
Comparatively, a
_search
withignore_unavailable=true
will work.