1、No mapping found for [update_time] in order to sort on( mapping 错误)
排序代码如下:
{ "sort": [ { "timestamp": { "order": "desc" } } ] }
修改后:
{ "sort": [ { "timestamp": { "order": "desc", "ignore_unmapped": true } } ] }
2、too_many_clauses: maxClauseCount is set to 10240(查询队列已满)
如果bool查询的查询条件过多会导致
TooManyClauses问题:
"caused_by":{"type":"too_many_clauses","reason":"maxClauseCount is set to 1024"}}}],
"caused_by":{"type":"query_shard_exception","reason":"failed to create query:
解决方式在配置文件 Elasticsearch.yuml中配置 index.query.bool.max_clause_count: 10240 设置最大限制bool查询的条数。过多会导致性能比较慢。
网友评论