mapper_parsing_exception: mapper_parsing_exception: failed to parse field [...] of type [...](フィールドの解析に失敗)
Elasticsearch意味
ドキュメントのインデックス作成中に、フィールドに送られた値がマッピングで定義されたそのフィールドの型と一致せず、解析できなかった。例えば integer として定義されたフィールドへのテキストの送信や、date として定義されたフィールドへの無効な日付形式の送信。
原因
フィールド型の不一致 (数値フィールドへの文字列、日付フィールドへの不正な形式)、想定される日付形式に合わない日付、不正/不完全な JSON、動的マッピングで誤った型になったフィールド、またはオブジェクトが期待される箇所へのスカラー値の送信。
対処方法
エラーメッセージのフィールド名と想定される型を確認する: GET /index-name/_mapping。ドキュメント内の値をフィールド型に合わせるか、正しい型でマッピングを定義し直す。date フィールドでは format パラメータをドキュメントの形式に合わせる。既存フィールドの型は変更できないため、必要なら新しいインデックスを作成し _reindex でデータを移す。アプリケーション層でデータを検証する。
同じデータベースの他の項目
- index_read_only_allow_deleteTOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block (旧形式: FORBIDDEN/12/index read-only / allow delete (api))
- high_disk_watermark_exceededhigh disk watermark [90%] exceeded / flood stage disk watermark [95%] exceeded(ディスクウォーターマークの超過)
- circuit_breaking_exceptionCircuitBreakingException[[parent] Data too large, data for [<...>] would be [...], which is larger than the limit of [...]](データが大きすぎる (サーキットブレーカー))
- 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 はデフォルトで無効)
- search_phase_execution_exceptionsearch_phase_execution_exception: all shards failed / Failed to execute phase [query](全シャードで検索フェーズの実行に失敗)
- too_many_clausestoo_many_clauses: maxClauseCount is set to 1024 (query contains too many clauses)(クエリの句が多すぎる)