具体报错信息如下:
{
"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 语法,:冒号后面有空格。文章来源:https://www.toymoban.com/news/detail-545286.html
2)重启ES生效:./bin/elasticsearch -d;文章来源地址https://www.toymoban.com/news/detail-545286.html
到了这里,关于Elasticsearch-7.10.2查询时报错:failed to create query: maxClauseCount is set to 1024的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!