概述
具体报错信息如下:
{
"error": {
"reason": "Error occurred in Elasticsearch engine: all shards failed",
"details": """Shard[0]: [2022/N0zTB2l7SiS4W1lvCNAsBg] QueryShardException[failed to create query: maxClauseCount is set to 1024]; nested: TooManyClauses[maxClauseCount is set to 1024];
For more details, please send request for Json format to see the raw response from elasticsearch engine.""",
"type": "SearchPhaseExecutionException"
},
"status": 400
}
原因:查询请求内容过长报错;
解决:
1)编辑ES的配置文件Elasticsearch.yml,添加:indices.query.bool.max_clause_count: 10240;
注:yml 语法,:冒号后面有空格。
2)重启ES生效:./bin/elasticsearch -d;
最后
以上就是畅快夕阳为你收集整理的Elasticsearch-7.10.2查询时报错:failed to create query: maxClauseCount is set to 1024的全部内容,希望文章能够帮你解决Elasticsearch-7.10.2查询时报错:failed to create query: maxClauseCount is set to 1024所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复