elasticsearch默认输出最多一万条
查询第10001条数据开始就会报错:Result window is too large, from + size must be less than or equal to
但是很多时候10000数据不能满足项目的需求,所以我们就要解除这个限制。
 
解决方案一:
1、修改elasticsearch输出默认限制条数

PUT 索引名称/_settings?preserve_existing=true
{
  "max_result_window": "1000000"
}

2、设置后只对已经存在的索引生效,新建的索引需重新设置

3、设置时索引名称可以使用通配符进行设置

 

解决方案二:

创建索引时设置

"settings":{
    "index":{
        "max_result_window":1000000
   } 
}

 

相关文章:

  • 2021-08-31
  • 2021-10-18
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2021-04-16
  • 2021-05-16
  • 2021-07-29
猜你喜欢
  • 2021-12-20
  • 2021-11-06
  • 2022-12-23
  • 2021-05-22
  • 2022-12-23
  • 2021-08-08
  • 2022-12-23
相关资源
相似解决方案