|
@@ -15,6 +15,34 @@ curl -XPUT http://127.0.0.1:19805/projectset/_mapping -u es_all:TopJkO2E_d1x -H
|
|
|
}
|
|
|
}'
|
|
|
|
|
|
+// 索引添加别名
|
|
|
+curl -H 'Content-Type: application/json' -u jybid:Top2023_JEB01i@31 -XPOST http://127.0.0.1:19905/_aliases -d '
|
|
|
+{
|
|
|
+ "actions": [
|
|
|
+ { "add": {
|
|
|
+ "alias": "bidding_pre",
|
|
|
+ "index": "bidding_20231120"
|
|
|
+ }}
|
|
|
+ ]
|
|
|
+}'
|
|
|
+
|
|
|
+// 添加并移除别名
|
|
|
+curl -H 'Content-Type: application/json' -u es_all:TopJkO2E_d1x -XPOST http://127.0.0.1:19805/_aliases -d '
|
|
|
+{
|
|
|
+ "actions": [
|
|
|
+ { "remove": {
|
|
|
+ "alias": "winner",
|
|
|
+ "index": "winner_v1"
|
|
|
+ }},
|
|
|
+ { "add": {
|
|
|
+ "alias": "winner",
|
|
|
+ "index": "winner_v2"
|
|
|
+ }}
|
|
|
+ ]
|
|
|
+}'
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//新增某字段mapping,es7 版本
|
|
|
curl -XPUT "http://127.0.0.1:19805/bidding_v1/_mapping" -u es_all:TopJkO2E_d1x -H 'Content-Type: application/json' -d '
|
|
|
{
|