legacy-knowledge-base
公開されました Jun. 30, 2025

再インデックスが正しく動作しない

written-by

Anushka Tiwari

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • 完全なインデックス再作成を実行すると、以下のエラーがログに表示されます。
org.elasticsearch.ElasticsearchStatusException: ElasticsearchStatusException[Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]]; 
nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default.
Please use a keyword field instead. Alternatively, set fielddata=true on [entryClassPK] in order to load field data by uninverting the inverted index.Note that this can use significant memory.]];
nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default.
Please use a keyword field instead. Alternatively, set fielddata=true on [entryClassPK] in order to load field data by uninverting the inverted index. Note that this can use significant memory.]];

環境

  • Liferay DXP 7.4

解決

  • 完全な再インデックスをクリックすると、まずインデックスを削除し、少し時間を空けてから、3番目にLiferayマッピングを適用したインデックスを作成します。
  • 上記のような例外は通常、Liferay のマッピングが適切に適用されていない場合に発生します。再インデックスのわずかな時間差で、ドキュメントがアップロードされ、変更され、インデックスが存在する前にインデックスに送信された場合、デフォルトのelastic mappingsが適用された状態でインデックスが自動的に作成されますが、これはポータルがインデックスを作成する場合に使用するデフォルトとは互換性がありません。
  • この挙動は、LPSによって対処されており、ここで追跡することができます: LPS-196039

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base