工作纪实36-ES查询条件过长

问题
es中使用bool查询时查询内容长度太长导致报错:

caused by: org.elasticsearch.common.io.stream.NotSerializableExceptionWrapper: too_many_clauses: maxClauseCount is set to 1024

错误信息提示:最大子句数量限制为1024

解决方案
1.设置es配置文件elasticsearch.yml

es 5.x以下:

    index.query.bool.max_clause_count: 10240

es 5.x以上:

    indices.query.bool.max_clause_count: 10240

sh elasticsearch -d

猜你喜欢

转载自blog.csdn.net/u013553309/article/details/131986130
今日推荐