PUT test/_settings
{
"index": {
"number_of_replicas" : 1
}
}
PUT test/_settings随着数据量的增大,每个分片中的数据量也会不断增加,为了不使每个分片中的数据量过大,就需要增加分片的数量,但是分片数在索引库创建之初就已经确定,并且不能改变。
{
"index": {
"number_of_shards" : 1
}
}
DELETE students1
PUT students1
{
"settings":{
"number_of_shards":3,
"number_of_replicas":1
},
"mappings":{
"student":{
"dynamic":"strict",
"properties":{
"id":{"type": "text", "store": true},
"name":{"type": "text","store": true},
"age":{"type": "integer","store": true},
"times": {"type": "text", "index": false}
}
}
}
}
PUT students1/student/1
{ "id" : "1",
"name" : "张三",
"age" : 20 ,
"times" : "2020-02-01"
}
DELETE students2
PUT students2
{ "settings":
{ "number_of_shards":5,
"number_of_replicas":1
},
"mappings":
{ "student":{ "dynamic":"strict", "properties":{ "id":{"type": "text", "store": true}, "name":{"type": "text","store": true}, "age":{"type": "integer","store": true}, "times": {"type": "text", "index": false} } }
}
}
POST _reindex
{
"source": {
"index": "students1"
},
"dest": {
"index": "students2"
}
}
PUT ods_big_epid/_mapping/ods_big_epid
{
"properties":{
"reportDate":{
"type": "date",
"format":"yyyy-MM-dd HH:mm:ss"
}
}
}
免责申明:
本文系转载,版权归原作者所有,如若侵权请联系我们进行删除!
《数据治理行业实践白皮书》下载地址:https://fs80.cn/4w2atu
《数栈V6.0产品白皮书》下载地址:https://fs80.cn/cw0iw1
想了解或咨询更多有关袋鼠云大数据产品、行业解决方案、客户案例的朋友,浏览袋鼠云官网:https://www.dtstack.com/?src=bbs
同时,欢迎对大数据开源项目有兴趣的同学加入「袋鼠云开源框架钉钉技术群」,交流最新开源技术信息,群号码:30537511,项目地址:https://github.com/DTStack