(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 }