[search_phase_execution_exception] without a root reason

al123od
Thu, 23 Oct 2025 13:37:02 +0000
Elasticsearch

Hello.

I’m using Elasticsearch 9.1.3, access with java client (no security, almost all setting but cluster name are default).

If to execute query_string query with wrong syntax like

GET test/_search

{

    "query": {

        "query_string": {

          "default_field": "description",

          "query": "\"test" /* no closing quote*/

        }

    }

} </>

using Kibana - I see detailed error message with description what exactly is wrong with query.

But when I run such query using Elasticsearch java client I see only top level exception in my app log, without cause (no information what is wront with query at all):

[es/search] failed: [search_phase_execution_exception] all shards failed

	at co.elastic.clients.transport.ElasticsearchTransportBase.getApiResponse(ElasticsearchTransportBase.java:372) ~[elasticsearch-java-9.1.3.jar:na]

	at co.elastic.clients.transport.ElasticsearchTransportBase.performRequest(ElasticsearchTransportBase.java:154) ~[elasticsearch-java-9.1.3.jar:na]

	at co.elastic.clients.elasticsearch.ElasticsearchClient.search(ElasticsearchClient.java:4824) ~[elasticsearch-java-9.1.3.jar:na]

…

Also I don’t see any message in elasticsearch logs.

Could you help with this issue, please?

11 posts - 3 participants