Elasticsearch Version
8.x, 9.x
Installed Plugins
No response
Java Version
bundled
OS Version
Any
Problem Description
For Elasticsearch APIs that take an index expression, some are cross-cluster enabled (e.g., _search) and some are not (_mapping).
For the endpoints that are not cross-cluster enabled, when they receive a qualified index expression (e.g., clusterA:myindex), an error is returned:
GET blogs,remote1:blogs/_mappings
// response:
"type": "illegal_argument_exception",
"reason": "Cross-cluster calls are not supported in this context but remote indices were requested: [remote1:blogs]"
However, when ignore_unavailable is set to true, this error message is no longer displayed and instead the API will process any local indices that were present:
GET blogs,remote1:blogs/_mappings?ignore_unavailable=true
// response gives the blogs mappings of the local cluster only
{
"blogs": {
"mappings": {
"properties": {
"authors": {
"properties": {
"company": {
"type": "text",
This is incorrect behavior. The ignore_unavailable setting should not be controlling whether this error message is returned. ignore_unavailable should control how to behave with respect to whether concrete indices are present or not on a cluster, but for endpoints that are not cross-cluster enabled at all, requesting a remote cluster is always a violation of the contract of that endpoint and thus should always result in an error.
Steps to Reproduce
See Problem Description section above.
Logs (if relevant)
No response
Elasticsearch Version
8.x, 9.x
Installed Plugins
No response
Java Version
bundled
OS Version
Any
Problem Description
For Elasticsearch APIs that take an index expression, some are cross-cluster enabled (e.g.,
_search) and some are not (_mapping).For the endpoints that are not cross-cluster enabled, when they receive a qualified index expression (e.g.,
clusterA:myindex), an error is returned:However, when ignore_unavailable is set to true, this error message is no longer displayed and instead the API will process any local indices that were present:
This is incorrect behavior. The
ignore_unavailablesetting should not be controlling whether this error message is returned.ignore_unavailableshould control how to behave with respect to whether concrete indices are present or not on a cluster, but for endpoints that are not cross-cluster enabled at all, requesting a remote cluster is always a violation of the contract of that endpoint and thus should always result in an error.Steps to Reproduce
See Problem Description section above.
Logs (if relevant)
No response