ES默认可查询数量在1万。使用分页方式是无法提高查询数量的。
需要修改es配置
PUT _all/_settings
{
"index.max_result_window":100000
}
如果只需要查询总数,在请求体中加入"track_total_hits": true, 就会展示正确总数
GET ***/_search
{
"track_total_hits": true
}
ES默认可查询数量在1万。使用分页方式是无法提高查询数量的。
需要修改es配置
PUT _all/_settings
{
"index.max_result_window":100000
}
如果只需要查询总数,在请求体中加入"track_total_hits": true, 就会展示正确总数
GET ***/_search
{
"track_total_hits": true
}