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

Liferayからindex.max_result_windowを増加させる方法。

投稿者

Sivakumar Perumal

knowledge-article-header-disclaimer-how-to

knowledge-article-header-disclaimer

legacy-article

learn-legacy-article-disclaimer-text

問題

  • 結果数がデフォルト(10000)より多い場合、Liferayポータルのログに以下のメッセージが表示されます:
    ERROR [http-nio-8080-exec-99][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=Result window is too large, from + size must be less than or equal to: [10000] but was [11000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Result window is too large, from + size must be less than or equal to: [10000] but was [11000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.]];

    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=Result window is too large, from + size must be less than or equal to: [10000] but was [11000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Result window is too large, from + size must be less than or equal to: [10000] but was [11000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.]];

Environment

  • Liferay DXP 7.2 (Elasticsearch 7 コネクタがインストールされています。)
  • Liferay DXP 7.3
  • Liferay DXP 7.4

解決策

  • Liferay DXP の `index.max_result_window` の設定は、以下の手順で行うことができます:

    Menu --> Control Panel --> System Settings --> Search --> Elasticsearch 7 --> Additional Index Configurations
    の下に以下の値を追加します。
    { 

    "index.max_result_window" :x

    }
  • x`はポータルに基づく任意の値である。 下の画像では、25000となっています。
    追加_インデックス_コンフィギュレーション.png
  • 設定変更後の完全な再インデックス化が必要です。
    コントロールパネル→設定→検索のインデックスアクションタブから、検索インデックスとスペルチェックインデックスの再インデックスを実行する。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base