400 Bad Request: Result window is too large

  • kuro19
    Participant
    2 months, 2 weeks ago #37875

    Hi,

    On PHP 8.1, ElasticSearch, I’ve already active the “Remove the limit on the number of results displayed. For Elasticsearch, the default limit is 10,000.” option but still see a lot of error log:

    400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [25540]. 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."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"my_mrm","node":"b7Mn-lG7QTuafO0J4kVEIA","reason":{"type":"illegal_argument_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [25540]. 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."}}],"caused_by":{"type":"illegal_argument_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [25540]. 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.","caused_by":{"type":"illegal_argument_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [25540]. 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."}}},"status":400}

    Can you please recheck?

    Thank you.

    kuro19
    Participant
    2 months, 2 weeks ago #37876

    For more information: Checked “Remove the limit on the number of results displayed.” option did display all results in Search, but still get error logs.

    wpsolr
    Keymaster
    2 months, 2 weeks ago #37879

    As mentioned in logs, you should be able to remove the warnings with the index settings max_result_window.

    kuro19
    Participant
    2 months, 2 weeks ago #38012

    Thought that it’s something that can be fixed on plugin level!

    Solution: https://repost.aws/questions/QUrSYhkwGlRVebHTFX2YJ3GA/how-to-increase-index-max-result-window-on-elasticsearch

    wpsolr
    Keymaster
    2 months, 2 weeks ago #38013

    Indeed, the option “Remove the limit on the number of results” is supposed to solve the issue. Setting max_result_window is your best shot now.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.