Elasticsearch version: current master
Descprition
Calling the _validate API against an existing and closed index with ignore_unavailable=true fails with cluster_block_exception.
Steps to Reproduce
PUT myindex
POST myindex/_close
POST myindex/_validate/query?explain=true&ignore_unavailable=true
{
"query":{
"query_string":{
"query":"abc AND"
}
}
}
The 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
}
Definition of Done
The API should return an index_closed_exception for the case of a closed index
GET myindex/_field_caps?fields=price
{
"error": {
"root_cause": [
{
"type": "index_closed_exception",
"reason": "closed",
"index_uuid": "B9sFIzOCRB-yPjh2Q9x1TA",
"index": "myindex"
}
],
"type": "index_closed_exception",
"reason": "closed",
"index_uuid": "B9sFIzOCRB-yPjh2Q9x1TA",
"index": "myindex"
},
"status": 400
}
And ignore the closed index, when ignore_unavailable=true
{
"indices": [],
"fields": {}
}
Elasticsearch version: current master
Descprition
Calling the
_validateAPI against an existing and closed index withignore_unavailable=truefails withcluster_block_exception.Steps to Reproduce
The last step will fail with:
Definition of Done
The API should return an
index_closed_exceptionfor the case of a closed indexAnd ignore the closed index, when
ignore_unavailable=true