Skip to content

ESQL: silently empty result in case of missing index instead of ValidationException #126275

@alex-spies

Description

@alex-spies

Applies to main, 8.x doesn't reproduce this.

Reproducer:

curl -u elastic:password -HContent-Type:application/json 'localhost:9200/test/_doc?refresh' -d '
{"foo": 1}
'

curl -u elastic-admin:elastic-password -H "Content-Type: application/json" 'localhost:9200/_query?format=txt' -d'
{                
  "query": "from test"     
}'

      foo      
---------------
1

curl -u elastic-admin:elastic-password -H "Content-Type: application/json" 'localhost:9200/_query?format=txt' -d '
{
  "query": "from test, missingindex"
}'
      foo      
---------------

Notice how the inclusion of missingindex in the index pattern causes the query to silently return an empty result. On 8.x, this (correctly) returns a verification exception.

Metadata

Metadata

Assignees

Labels

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