Elasticsearch设置查询数量的限制
- 问题描述
The maximum value of from + size for searches to this index. Defaults to 10000. Search requests take heap memory and time proportional to from + size and this limits that memory
- 官方文档
https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html
-
解决方案
PUT /accounts_contract/_settings
{ “index.max_result_window” :“10000000”} #这里设置最大的返回数量