elasticsearch sets the maximum number of returned items

There are two ways:

1. It can be set through the url, which is convenient and quick without restarting. as follows:

 

curl -XPUT http://127.0.0.1:9200/book/_settings -d '{ "index" : { "max_result_window" : 200000000}}'

Notice:

1. The size of size cannot exceed the setting of the parameter index.max_result_window, the default is 10,000. 

2. You need to search for paging, which can be done by combining from size. from indicates which row to start from, and size indicates how many documents to query. from defaults to 0, size defaults to 10

2. Setting through the configuration file

{ "order": 1, "template": "index_template*", "settings": { "index.number_of_replicas": "0", "index.number_of_shards": "1", "index.max_result_window": 2147483647 }

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326237300&siteId=291194637
Recommended