search_phase_execution_exception: search_phase_execution_exception: all shards failed / Failed to execute phase [query](全シャードで検索フェーズの実行に失敗)
Elasticsearch意味
検索要求が必要なシャードの一部またはすべてで失敗した。これは実際の根本原因を包む汎用の検索エラーであり、"caused by" セクションに真の問題 (解析エラー、ブレーカー、不適切なフィールド型、シャードに到達できないなど) が示される。
原因
無効なクエリ構文、誤ったフィールド型での集計、too_many_clauses、サーキットブレーカーの作動、未割り当て/到達不能なシャード、クエリのタイムアウト、またはノードのクラッシュ。根本原因は応答の内側の例外にある。
対処方法
応答の "caused by" / "failed_shards" の詳細から実際の例外を特定し、それに応じて修正する (クエリの修正、keyword フィールドの使用、ブレーカー/ヒープの設定、シャード割り当て)。クラスタの健全性を確認する: GET _cluster/health と GET _cat/shards?v。部分的な結果が許可されていて一部のシャードが失敗した場合は、allow_partial_search_results の動作を見直す。
同じデータベースの他の項目
- 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(strict マッピングで新しいフィールドの動的追加は不可)
- 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(text フィールドの fielddata はデフォルトで無効)
- 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)(インデックスが存在しない)