Skip to content

ignore_unavailable=true ignored when a single index is specified #7153

@spalger

Description

@spalger

We noticed an edge case today when using the ignore_unavailable parameter against indices that are closed. Running the following in Sense produces a 403 error, which was very unexcepted.

curl -XPOST "http://localhost:9200/test_index/test_type" -d'
{
  "some": "value"
}'

curl -XPOST "http://localhost:9200/test/_close"

curl -XPOST "http://localhost:9200/test/_search?ignore_unavailable=true"
# {
#   "error": "ClusterBlockException[blocked by: [FORBIDDEN/4/index closed];]",
#   "status": 403
# }

Alternatively, if I send test* I get the expected empty result.

curl -XPOST "http://localhost:9200/test*/_search?ignore_unavailable=true"
# {
#   "took": 1,
#   "timed_out": false,
#   "_shards": {
#     "total": 0,
#     "successful": 0,
#     "failed": 0
#    },
#    // etc.
# }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions