elasticsearch操作命令

GET _search
{
"query": {
"match_all": {}
}
}

GET /logstash-test/_settings

PUT /logstash-test/_settings
{
"number_of_replicas" : "1"
}

PUT /logstash-test/_settings
{
"index": {
"translog": {
"flush_threshold_size": "1024mb",
"sync_interval": "30s",
"durability": "async"
}
}
}

PUT /logstash-test/_settings
{
"index" : {
"refresh_interval" : "30s"

}

}

GET _template/hrb_template

PUT template/hrb_template
{
"order" : 1,
"index_patterns": ["hrb
", "hrb-"],
"settings": {
"number_of_shards": 6,
"number_of_replicas":1,
"index": {
"translog": {
"flush_threshold_size": "1024mb",
"sync_interval": "30s",
"durability": "async"
}
}
}
}

PUT /_cluster/settings
{
"persistent": {
"cluster": {
"max_shards_per_node":10000
}
}
}

PUT /_cluster/settings
{
"transient" : {
"cluster.routing.allocation.enable" : "all"
}
}

原文地址:https://www.cnblogs.com/peitianwang/p/14081055.html