報錯信息:
trying to create too many buckets. must be less than or equal to: [100000] but was [100001]. this limit can be set by changing the [search.max_buckets] cluster level setting.
錯誤描述:
es中存了大量的數據,因而分桶時會有很多的bucket,而es默認桶上限是10000。這是6.x以后版本的特性, 目的是限制大批量聚合操作, 規避性能風險。
解決方法:
修改配置文件
進入es的docker容器里
sudo docker exec -it es /bin/bash
打開配置文件
vi config/elasticsearch.yml
將下面的復制進去保存,退出容器交互界面,重啟es容器
search.max_buckets: 200000