diff --git a/easy-es-core/README.md b/easy-es-core/README.md index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..30aace37d3cb567868f49af6335b76c673420a2c 100644 --- a/easy-es-core/README.md +++ b/easy-es-core/README.md @@ -0,0 +1,44 @@ + + +## 常见问题 + +### es查询查过1024个元素报错 + +报错如下: +``` +Caused by: org.elasticsearch.common.io.stream.NotSerializableExceptionWrapper: too_many_clauses: maxClauseCount is set to 1024 +``` + +原因:es的in查询,in中id大于1024个,导致es报错,es默认支持元素数量为1024个 + +```yaml +# es 5.x以下: +index.query.bool.max_clause_count: 10240 + +# es 5.x以上: +indices.query.bool.max_clause_count: 300000 +``` + +### 报错`field expansion matches too many fields` + +``` +"reason": "field expansion matches too many fields, limit: 1024, got: 15448" +``` + +处理方案同【es查询查过1024个元素】 + + +### 字段上限错误 + +``` +{“error”:{“root_cause”:[{“type”:“remote_transport_exception”,“reason”:"[node1][ip:9300][indices:data/write/update[s]]"}],“type”:“illegal_argument_exception”,“reason”:“Limit of total fields [1000] in index [xxx has been exceeded”},“status”:400} +``` + +解决方式: +``` +PUT index名/_settings +{ + "index.mapping.total_fields.limit": 5000 +} + +``` \ No newline at end of file