Description
I am currently using ES 8.18.0 version to query the index of log data streams using _Sql, and occasionally encounter errors,
URI [/_sql?format=json], status line [HTTP/1.1 503 Service Unavailable]
{"error":{"root_cause":[],"type":"search_phase_execution_exception","reason":"","phase":"indices:data/read/open_point_in_time","grouped":true,"failed_shards":[],"caused_by":{"type":"search_phase_execution_exception","reason":"[open_point_in_time] action requires all shards to be available. Missing shards: [[.ds-logs.vnet.pod.region-gateway.appgw.appgw-controller-rpm-2025.07.08-000048][0], [.ds-logs.vnet.pod.region-gateway.appgw.appgw-controller-rpm-2025.07.08-000048][1], [.ds-logs.vnet.pod.region-gateway.appgw.appgw-controller-rpm-2025.07.08-000048][2]]. Consider using allow_partial_search_results setting to bypass this error.","phase":"indices:data/read/open_point_in_time","grouped":true,"failed_shards":[]}},"status":503}
It seems that this situation only occurs after creating a new index. I checked the cluster settings for search.dfault.allow_rartis_results and found that it was set to true. Additionally, according to the documentation, allow_partial-search_desults can be used for the esearch API, but I did not see this option in the SQL API request body parameters.
How can I solve the occasional error in this query, which has a significant impact on my business scenario