【发布时间】:2017-10-10 11:53:15
【问题描述】:
我使用的是 ES 5.2.0,在某些查询执行过程中出现以下异常:
Caused by: NotSerializableExceptionWrapper[too_many_clauses: maxClauseCount is set to 1024]
at org.apache.lucene.search.BooleanQuery$Builder.add(BooleanQuery.java:125)
at org.elasticsearch.index.query.BoolQueryBuilder.addBooleanClauses(BoolQueryBuilder.java:449)
at org.elasticsearch.index.query.BoolQueryBuilder.doToQuery(BoolQueryBuilder.java:418)
解决这个问题。我正在尝试通过在查询下方运行来更改“indices.query.bool.max_clause_count”值
请求:
PUT http://localhost:9200/_all/_settings?preserve_existing=true
{"indices.query.bool.max_clause_count" : "100000"}
回复:
{
"error": {
"root_cause": [
{
"type": "remote_transport_exception",
"reason": "[06LrSZC][localhost:9300][indices:admin/settings/update]"
}
],
"type": "illegal_argument_exception",
"reason": "unknown setting [index.indices.query.bool.max_clause_count] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
},
"status": 400
}
我曾经解决但无法解决的参考:
https://discuss.elastic.co/t/5-0-0-alpha2-how-to-set-index-query-bool-max-clause-count/49816
https://github.com/elastic/elasticsearch/pull/18341
请让我知道执行此操作的正确请求 JSON。
【问题讨论】:
标签: elasticsearch elasticsearch-5