Help Center/ Cloud Search Service/ FAQs/ Using CSS Cluster Search Engines/ How Do I Change the Maximum Number of Results Returned in Response to a Single Search Request to a Specific Index in a CSS Elasticsearch Cluster?
Updated on 2026-04-30 GMT+08:00

How Do I Change the Maximum Number of Results Returned in Response to a Single Search Request to a Specific Index in a CSS Elasticsearch Cluster?

Solution

  • Method 1

    Open Kibana and run the following commands on the Dev Tools page:

    PUT _all/_settings?preserve_existing=true
    {
    "index.max_result_window" : "10000000"
    }
  • Method 2

    Run the following command on a server (a non-security mode cluster is used as an example here):

    curl -k -XPUT 'http://localhost:9200/*/_settings?preserve_existing=true' -d \
    '{
      "index.max_result_window": "1000000"
    }'

    localhost indicates the address of the Elasticsearch cluster.

This setting affects the consumption of memory and CPU resources. Exercise caution when setting this parameter.