赞
踩
以下均为[GET]操作
查看ElasticSearch全部索引 http://{ip}:9200/_cat/indices?v
查看ElasticSearch集群节点 http://{ip}:9200/_cat/nodes?v
查看ElasticSearch版本信息 http://{ip}:9200/
查看ElasticSearch集群状态 http://{ip}:9200/_cluster/health?pretty
查看ElasticSearch当前主节点 http://{ip}:9200/_cat/master?v
查看ElasticSearch集群指标 http://{ip}:9200/_cluster/stats?pretty
查看ElasticSearch别名信息 http://{ip}:9200/_cat/aliases?v
查看ElasticSearch模板信息 http://{ip}:9200/_cat/templates?v
查看ElasticSearch分配情况 http://{ip}:9200/_cat/allocation?v
查看ElasticSearch文档总数 http://{ip}:9200/_cat/count?v
查看ElasticSearch修复状态 http://{ip}:9200/_cat/recovery?v
查看ElasticSearch分片信息 http://{ip}:9200/_cat/shards?v
查看ElasticSearch挂起任务 http://{ip}:9200/_cluster/pending_tasks?pretty
查看ElasticSearch热线程 http://{ip}:9200/_nodes/hot_threads?pretty
false表示可以通配符删除
true表示不可以通配符删除
[PUT] _cluster/settings
{
"transient": {
"action.destructive_requires_name": false
}
}
用于配置生命周期后,自动分裂分片使用
[PUT] _cluster/settings
{
"transient": {
"cluster.max_shards_per_node": 100000
}
}
所有索引生效
[PUT] _all/_settings
{
"index.max_result_window": 50000
}
单个索引生效
[PUT] {index}/_settings
{
"index.max_result_window": 50000
}
同时设置多个在数组里增加即可
“is_write_index”: true表示当多个索引共用同一个别名时,设置当前索引为写索引,读的话走别名,可以将所有索引数据都查到
[POST] _aliases
{
"actions": [{
"add": {
"index": "m12_insertzone-000001",
"alias": "m12_insertzone",
"is_write_index": true
}
}]
}
[POST] {index}/_settings
{
"index.lifecycle.name": "iscas",
"index.lifecycle.rollover_alias": "m12_insertzone"
}
[PUT] {index} { "aliases": { "m12_insertzone": { "is_write_index": true } }, "settings": { "index.number_of_shards": "6", "index.number_of_replicas": "1", "index.lifecycle.name": "iscas-ilm-policy", "index.lifecycle.rollover_alias": "m12_insertzone", "index": { "routing": { "allocation": { "require": { "hotwarm_type": "hot" } } }, "translog": { "durability": "async", "sync_interval": "30s", "flush_threshold_size": "1024mb" } } }, "mappings": {} }
[PUT] _template/{name}
{ "index_patterns": ["m22_sample_30-*"], "order": 0, "settings": { "index": { "lifecycle": { "rollover_alias": "m22_sample_30", "name": "iscas-ilm-policy" }, "routing": { "allocation": { "require": { "hotwarm_type": "hot" } } }, "number_of_shards": "6", "number_of_replicas": "1", "translog": { "durability": "async", "sync_interval": "30s", "flush_threshold_size": "1024mb" } } }, "mappings": {} }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。