illegal_argument_exception_fielddata: illegal_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 はデフォルトで無効)
Elasticsearch意味
アナライズされた text フィールドに対して集計、ソート、またはスクリプトを試行した。これらの操作はメモリコストの高い fielddata を必要とするため、text フィールドではデフォルトで無効になっている。
原因
text フィールドに直接集計/ソートを適用した。Elasticsearch では text は全文検索に、keyword は完全一致の集計/ソートに使う。両者を混同するとこのエラーが発生する。
対処方法
集計/ソートにはフィールドの keyword サブフィールドを使う (例: "my_field.keyword")。フィールドが text のみの場合は、マッピングに keyword サブフィールドを追加し (マルチフィールド)、_reindex を実行する。text フィールドで fielddata を有効にする (fielddata=true) ことも可能だが、メモリ消費が大きくサーキットブレーカーのリスクがあるため推奨されない。やむを得ない場合にのみ使う。
同じデータベースの他の項目
- circuit_breaking_exceptionCircuitBreakingException[[parent] Data too large, data for [<...>] would be [...], which is larger than the limit of [...]](データが大きすぎる (サーキットブレーカー))
- 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 マッピングで新しいフィールドの動的追加は不可)
- 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)(クエリの句が多すぎる)
- 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(ドキュメントが存在しない)