(1)简单方式ide
PUT study
#! Deprecation: the default number of shards will change from [5] to [1] in 7.0.0; if you wish to continue using the default of [5] shards, you must manage this on the create index request or with an index template { "acknowledged": true, "shards_acknowledged": true, "index": "study" }
备注:索引名不能包含大些字母ui
(2)指定参数this
PUT learn { "settings": { "number_of_shards": 3, "number_of_replicas": 1 } }
(1)查看指定索引的配置信息code
GET /learn/_settings { "learn": { "settings": { "index": { "creation_date": "1539313402808", "number_of_shards": "3", "number_of_replicas": "1", "uuid": "uJaeq_ttTLKArUZNwefGeg", "version": { "created": "6040299" }, "provided_name": "learn" } } } }
(2)查看多个索引索引
GET /learn,study/_settings
DELETE test { "acknowledged": true }
(1)关闭索引it
POST /learn/_close
(2)尝试插入数据io
PUT /learn/article/1 { "title":"kibana" } { "error": { "root_cause": [ { "type": "index_closed_exception", "reason": "closed", "index_uuid": "uJaeq_ttTLKArUZNwefGeg", "index": "learn" } ], "type": "index_closed_exception", "reason": "closed", "index_uuid": "uJaeq_ttTLKArUZNwefGeg", "index": "learn" }, "status": 400 }
(3)从新打开索引test
POST /learn/_open { "acknowledged": true, "shards_acknowledged": true }