- 
                Notifications
    
You must be signed in to change notification settings  - Fork 25.6k
 
Closed
Labels
:Search Foundations/CCS>bugTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearchpriority:normalA label for assessing bug priority to be used by ES engineersA label for assessing bug priority to be used by ES engineers
Description
This came up in #120355 (comment), when @idegtiarenko wanted to improve the grammar for CCQ.
The problem is that invalid cluster names return an empty result without any error message.
Reproducers against a local cluster:
./gradlew run -Dlicense.key=x-pack/license-tools/src/test/resources/public.key -Dtests.es.xpack.license.self_generated.type=trial -Dtests.es.xpack.security.enabled=true
$ curl -u elastic:password -H "Content-Type: application/json" "127.0.0.1:9200/_cluster/settings" -XPUT -d '
{ "persistent": {
  "cluster": {                                
    "remote" : {
      "cluster_one": { 
        "seeds": ["127.0.0.1:9443"]
      }
    }
  }
}}
'
$ curl -u elastic:password -H "Content-Type: application/json" "127.0.0.1:9200/_query?format=txt" -d '
{
  "query": "from cluster_one:\"remote:index\""
}'
  <no-fields>  
---------------
$ curl -u elastic:password -H "Content-Type: application/json" "127.0.0.1:9200/_query?format=txt" -d '
{
  "query": "from cluster_one:remote:index"   
}'
{"error":{"root_cause":[{"type":"parsing_exception","reason":"line 1:24: mismatched input ':' expecting {<EOF>, '|', ',', 'metadata'}"}],"type":"parsing_exception","reason":"line 1:24: mismatched input ':' expecting {<EOF>, '|', ',', 'metadata'}","caused_by":{"type":"input_mismatch_exception","reason":null}},"status":400}%
$ curl -u elastic:password -H "Content-Type: application/json" "127.0.0.1:9200/_query?format=txt" -d '
{
  "query": "from \"cluster_one:remote:index\""
}'
  <no-fields>  
---------------
Metadata
Metadata
Assignees
Labels
:Search Foundations/CCS>bugTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearchpriority:normalA label for assessing bug priority to be used by ES engineersA label for assessing bug priority to be used by ES engineers