关于ES查询大于10000条问题
es官方默认限制索引查询最多只能查询10000条数据,查询第10001条数据开始就会报错:Result window is too large, from + size must be less than or equal to但是很多时候10000数据不能满足项目的需求,所以我们就要解除这个限制。track_total_hits 参数设置true即可。查询示例:http://ip:port/in
·
es官方默认限制索引查询最多只能查询10000条数据,查询第10001条数据开始就会报错:
Result window is too large, from + size must be less than or equal to
但是很多时候10000数据不能满足项目的需求,所以我们就要解除这个限制。
track_total_hits 参数设置true即可。
查询示例:
http://ip:port/indexName/_search
{
"track_total_hits":true,
"query":{
"match":{
"name":"value"
}
}
}
更多推荐
所有评论(0)