Legacy Knowledge Base
Published Jul. 2, 2025

How to increase index.max_result_window from Liferay

Written By

Sivakumar Perumal

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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.
Note: please note that Liferay has renamed its Liferay Experience Could offerings to Liferay SaaS (formerly LXC) and Liferay PaaS (formerly LXC-SM).

Issue

  • When the number of results is more than the default (10000) the following message appears on the Liferay portal logs:
    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 (with Elasticsearch 7 connector installed)
  • Liferay DXP 7.3
  • Liferay DXP 7.4

Resolution

  • Configuring `index.max_result_window` in Liferay DXP can be done by following the below:

    Go to Menu --> Control Panel --> System Settings --> Search --> Elasticsearch 7
  • if you see a "Max Result Window" field, use it to change to the desired value
  • if you don't see a "Max Result Window" field, use the "Additional Index Configurations" field by entering something like below:


    "index.max_result_window" :x

    }
  • `x` should be any value based on the portal. In the below image, it is 25000.
    Additional_Index_Configurations.png
  • Requires full reindex post configurational changes. (note: might not be the case when using the "Max Result Window" field)
    Execute re-index the search indexes and spell check indexes from the Index Actions tab of Control Panel → Configuration → Search

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base