elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.71k stars 24.67k forks source link

Running a query with a syntax error can have different root causes #108665

Open dbrimley opened 4 months ago

dbrimley commented 4 months ago

Elasticsearch Version

8.x

Installed Plugins

No response

Java Version

bundled

OS Version

unknown

Problem Description

Running a query with a syntax error can have different root causes, throwing either a parse_exception or query_shard_exception on clusters with more than one node.

Could you make it show the same error when triggered in all scenarios?

Steps to Reproduce

Running a simple query like the below multiple times in the Dev console will show both errors.

POST my_simple_index/_search
{
  "query": {
    "query_string": {
      "query": "keyword +"
    }
  },
  "size": 1000
}

Logs (if relevant)

No response

elasticsearchmachine commented 4 months ago

Pinging @elastic/es-search (Team:Search)

elasticsearchmachine commented 2 months ago

Pinging @elastic/es-search-relevance (Team:Search Relevance)