#!/bin/bash
# 自动配置脚本
curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
"persistent": {
"search.max_buckets": 10000,
"indices.query.bool.max_clause_count":1024
}
}'如有开启安全密码可以用
curl -u admin:your_password -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
"persistent": {
"search.max_buckets": 10000,
"indices.query.bool.max_clause_count": 1024
}
}'验证结果用以下命令
curl -s -X GET "localhost:9200/_cluster/settings?include_defaults=true&flat_settings=true" | grep -E "max_buckets|max_clause_count"