1. 创建索引
PUT test //test 索引名称
返回结果: { "acknowledged": true, "shards_acknowledged": true, "index": "test" }
2. 查询索引设置
GET test/_settings?pretty
返回结果: { "test": { "settings": { "index": { "creation_date": "1629217681883", "number_of_shards": "5", "number_of_replicas": "2", "uuid": "5p2S3xQ9QLGhtgoKc4A", "version": { "created": "6000099" }, "provided_name": "test" } } } }
3. 查询所有索引
GET _cat/indices?v
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size yellow open test LL9Lbu0LTLKeJRb7Em4tiA 5 1 0 0 1.1kb 1.1kb
4. 设置副本数
PUT smartpen_pages_dots/_settings { "number_of_replicas": 1 }
返回结果: { "acknowledged": true }