elasticsearch做分页查询时,当查询记录超过10000时,会报如下错误:
Result window is too large, from + size must be less than or equal to: [10000] but was [36200]........
需要设置索引的查询范围:红框为自己的索引名
PUT http://localhost:9200/logs/_settings/
{
"index":{
"max_result_window":2000000
}
}
设置成功返回:
{
- "acknowledged": true
}