各位老师好,在使用ES过程中发现ES查询报错,报错信息是“type":"too_many_clauses","reason":"too_many_clauses: maxClauseCount is set to 1024"”,报错原因是布尔查询中的term超过了1024个限制,但是无法更改index.query.bool.max_clause_count配置参数,想请教一下是否有什么好的解决办法。
现在的查询为"query":{
"bool":{
"should":{}---->超过1024个term
}
}
如果改成"query":{
"bool":{
"bool":{
"should":{}, ---->对查询条件做切割 比如600条
"should":{} ---->对查询条件做切割 比如600条
}
}
}可以吗,或者说有什么更优的解决方案,谢谢各位老师
现在的查询为"query":{
"bool":{
"should":{}---->超过1024个term
}
}
如果改成"query":{
"bool":{
"bool":{
"should":{}, ---->对查询条件做切割 比如600条
"should":{} ---->对查询条件做切割 比如600条
}
}
}可以吗,或者说有什么更优的解决方案,谢谢各位老师
2 个回复
tacsklet - 公司有用到es
赞同来自:
hyzz
赞同来自: