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

Liferay Server が org.elasticsearch.action.search.SearchPhaseExecutionException で起動される。

written-by

Laura Li

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

問題

  • Liferayが起動すると、以下のようなエラーが発生します:
    ERROR [liferay/schedulerdispatch-5][ElasticsearchIndexSearcher:169] java.lang.RuntimeException: 
    org.elasticsearch.action.search.SearchPhaseExecutionException: 
    Failed to execute phase [query], all shards failed; shardFailures {[uLTKGY0yQGOhY7um23rIOw][liferay-20101][0]: 
    RemoteTransportException[[node-1][10.241.20.11:9300][indices:data/read/search[phase/query]]]; nested: 
    IllegalArgumentException[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 [localizedtitleenUS_sortable] in order to load field data by uninverting the inverted index. Note that this can use significant memory.]; }
    ......

環境

  • Liferay DXP 7.2

解像度

  • ESクラスタが他のアプリケーションに対応していない場合は、elasticsearch.ymlに
    action.auto_create_index:false
    を追加し、完全な再インデックスを行ってもよいでしょう。
  • 考えられる根本的な原因:完全な再インデックスを実行すると、インデックス(したがってマッピング)が削除され、その後インデックスが再作成され、マッピングが設定されます。 理論的には、インデックス作成と「キャッチオール」ダイナミックテンプレートの投入(インデックス作成後に発生)の間に、これらのフィールドを持つドキュメントがelasticに送信され、マッピングが自動作成されました。

追加情報

  • この設定については、Elasticのドキュメントを参照してください。
    https://www.elastic.co/guide/en/elasticsearch/reference/7.17/index-management-settings.html

did-this-article-resolve-your-issue

legacy-knowledge-base