1. 新建索引
PUT /xxx
{
"settings": {
"number_of_shards": 4,
"number_of_replicas": 1
},
"mappings": {
"_doc": {
"properties": {
"activityFinishedTime": {
"type": "long"
}
"create_time": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss.SSS||yyyy-MM-dd HH:mm:ss||epoch_millis"
}
}
}
}
}
2.索引数据同步
POST _reindex
{
"source": {
"index": "xxx"
},
"dest": {
"index": "xxx_v2"
}
}
3.删除索引
DELETE /xxx/
4.索引重命名
POST _aliases
{
"actions":[
{
"add":{
"index":"xxx_v2",
"alias":"xxx_alias"
}
}
]
}
网友评论