Skip to content

_field_caps doesn't honour ignore_unavailable option with closed index #107767

@bpintea

Description

@bpintea

Elasticsearch Version

8.14, also current master (@8201172)

Installed Plugins

No response

Java Version

bundled

OS Version

macos

Problem Description

Querying an inexistent index'es _field_caps with ignore_unavailable=true will work (returns no caps).
The same, but with an existing and closed index fails with cluster_block_exception.

Steps to Reproduce

  1. PUT myindex
  2. POST myindex/_close
  3. GET myindex/_field_caps?fields=*&ignore_unavailable=true

Logs (if relevant)

Last step will fail with:

{
    "error": {
        "root_cause": [
            {
                "type": "cluster_block_exception",
                "reason": "index [myindex] blocked by: [FORBIDDEN/4/index closed];"
            }
        ],
        "type": "cluster_block_exception",
        "reason": "index [myindex] blocked by: [FORBIDDEN/4/index closed];"
    },
    "status": 403
}

Metadata

Metadata

Assignees

Labels

:Search Foundations/MappingIndex mappings, including merging and defining field types>bugTeam:Search FoundationsMeta label for the Search Foundations team in Elasticsearchpriority:normalA label for assessing bug priority to be used by ES engineers

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions