legacy-knowledge-base
公開されました Jul. 2, 2025

デフォルトでは、テキスト フィールドのフィールド データは無効になっています

written-by

Pooja Bhambani

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

問題

コマースでバニラ インスタンスを実行しようとすると、 IllegalArgumentException が発生し、カタログ ページで検索機能が正しく動作しません。

  • テキスト フィールドが最適化されていません
    ERROR [http-nio-8080-exec-7][ElasticsearchIndexSearcher:165] java.lang.RuntimeException: 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 [basePrice] 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 [basePrice] in order to load field data by uninverting the inverted index. Note that this can use significant memory.]];

Environment

  • Liferay DXP 7.3
  • Commerce 3.0

解決策

ご注意ください: 再インデックスを実行する前に、完全なバックアップを取得してください。データによっては、かなりの時間がかかる場合があります。 したがって、あなたの裁量に従って、それに応じて再インデックスを実行してください。

  • このエラーが発生したのは、 Commerce ではエラスティック検索マッピングでいくつかのマッピング フィールドが変更されたためです。
  • これを解決するには、すべての検索インデックスの完全な再インデックスを実行します。
  • コントロール パネル -> 構成 -> 検索 -> に移動し、インデックス アクションに移動し、「すべての検索インデックスの再インデックス」テキストの横にある実行ボタンをクリックします。
did-this-article-resolve-your-issue

legacy-knowledge-base