search_phase_execution_exception: search_phase_execution_exception: all shards failed / Failed to execute phase [query]
ElasticsearchWhat does it mean?
A search request failed on one or all of the required shards. This is a generic search error wrapping the actual underlying cause; the "caused by" section states the real problem (parse error, breaker, unsuitable field type, shard unreachable, etc.).
Why does it happen?
Invalid query syntax, aggregation on the wrong field type, too_many_clauses, a circuit breaker trip, an unassigned/unreachable shard, a query timeout or a node crash. The root cause is in the inner exception of the response.
How to fix it
Find the actual exception in the "caused by" / "failed_shards" details of the response and fix accordingly (correct the query, use a keyword field, breaker/heap settings, shard allocation). Check cluster health: GET _cluster/health and GET _cat/shards?v. If partial results are allowed and some shards failed, review the allow_partial_search_results behavior.
More from this engine
- mapper_parsing_exceptionmapper_parsing_exception: failed to parse field [...] of type [...]
- strict_dynamic_mapping_exceptionstrict_dynamic_mapping_exception: mapping set to strict, dynamic introduction of [...] within [...] is not allowed
- illegal_argument_exception_fielddataillegal_argument_exception: Fielddata is disabled on text fields by default. Set fielddata=true on [your_field] in order to load fielddata in memory
- too_many_clausestoo_many_clauses: maxClauseCount is set to 1024 (query contains too many clauses)
- version_conflict_engine_exceptionversion_conflict_engine_exception: [_doc][id]: version conflict, current version [x] is different than the one provided [y] (HTTP 409)
- document_missing_exceptiondocument_missing_exception: [_doc][id]: document missing
- index_not_found_exceptionindex_not_found_exception: no such index [index_name] (HTTP 404)