具体报错信息如下:

{
  "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;

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐