|
@@ -0,0 +1,70 @@
|
|
|
|
+1、添加字段钱,先打开 节点平衡
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+curl -H 'Content-Type: application/json' -u jybid:Top2023_JEB01i@31 -XPUT http://127.0.0.1:19908/_cluster/settings -d'{
|
|
|
|
+ "transient" : {
|
|
|
|
+ "cluster.routing.allocation.enable" : "all"
|
|
|
|
+ }
|
|
|
|
+}'
|
|
|
|
+```
|
|
|
|
+2、添加字段
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+curl -u jybid:Top2023_JEB01i@31 -XPUT "http://127.0.0.1:19908/bidding/_mapping" -H 'Content-Type: application/json' -d'
|
|
|
|
+{
|
|
|
|
+ "properties": {
|
|
|
|
+ "basicClass": {
|
|
|
|
+ "type": "keyword"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+'
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+curl -u jybid:Top2023_JEB01i@31 -XPUT "http://127.0.0.1:19908/projectset/_mapping" -H 'Content-Type: application/json' -d'
|
|
|
|
+{
|
|
|
|
+ "properties": {
|
|
|
|
+ "projectperiod": { "type": "keyword" },
|
|
|
|
+ "basicClass": { "type": "keyword" },
|
|
|
|
+ "est_purchase_time": { "type": "long" },
|
|
|
|
+ "signaturedate": { "type": "long" },
|
|
|
|
+ "expiredate": { "type": "long" },
|
|
|
|
+ "docendtime": { "type": "long" },
|
|
|
|
+ "docstarttime": { "type": "long" },
|
|
|
|
+ "bidstarttime": { "type": "long" }
|
|
|
|
+ }
|
|
|
|
+}'
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+curl -u jybid:Top2023_JEB01i@31 -XPUT "http://127.0.0.1:19908/projectset/_mapping" -H 'Content-Type: application/json' -d'
|
|
|
|
+{
|
|
|
|
+ "properties": {
|
|
|
|
+ "list": {
|
|
|
|
+ "properties": {
|
|
|
|
+ "projectperiod": { "type": "keyword" },
|
|
|
|
+ "basicClass": { "type": "keyword" },
|
|
|
|
+ "est_purchase_time": { "type": "long" },
|
|
|
|
+ "signaturedate": { "type": "long" },
|
|
|
|
+ "expiredate": { "type": "long" },
|
|
|
|
+ "docendtime": { "type": "long" },
|
|
|
|
+ "docstarttime": { "type": "long" },
|
|
|
|
+ "bidstarttime": { "type": "long" }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}'
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+3、关闭节点平衡
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+curl -H 'Content-Type: application/json' -u jybid:Top2023_JEB01i@31 -XPUT http://127.0.0.1:19908/_cluster/settings -d'{
|
|
|
|
+ "transient" : {
|
|
|
|
+ "cluster.routing.allocation.enable" : "none"
|
|
|
|
+ }
|
|
|
|
+}'
|
|
|
|
+```
|