Jianghan 2 tahun lalu
induk
melakukan
b63280ef7f

+ 6 - 305
mapping/biddingall.txt

@@ -57,7 +57,7 @@ curl -XPUT http://127.0.0.1:9800/bidding_all -d '{
           }
         }
       },
-      "number_of_shards": "13",
+      "number_of_shards": "1",
       "number_of_replicas": "0"
     }
   },
@@ -74,101 +74,6 @@ curl -XPUT http://127.0.0.1:9800/bidding_all -d '{
         "enabled": false
       },
       "properties": {
-        "buyerzipcode": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "winnertel": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "winnerperson": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "contractcode": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "winneraddr": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "agencyaddr": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "buyeraddr": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "signaturedate": {
-          "type": "long"
-        },
-        "projectperiod": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "projectaddr": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "agencytel": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "agencyperson": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "buyerperson": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "agency": {
-          "index": "not_analyzed",
-          "type": "string",
-          "fields": {
-            "magency": {
-              "analyzer": "my_ngram",
-              "type": "string"
-            }
-          }
-        },
-        "projectcode": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "bidopentime": {
-          "type": "long"
-        },
-        "supervisorrate": {
-          "type": "double"
-        },
-        "buyertel": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "bidamount": {
-          "type": "double"
-        },
-        "winner": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "buyer": {
-          "index": "not_analyzed",
-          "type": "string",
-          "fields": {
-            "mbuyer": {
-              "analyzer": "my_ngram_title",
-              "type": "string"
-            }
-          }
-        },
-        "budget": {
-          "type": "double"
-        },
         "projectname": {
           "index": "not_analyzed",
           "type": "string",
@@ -178,54 +83,28 @@ curl -XPUT http://127.0.0.1:9800/bidding_all -d '{
             }
           }
         },
-        "buyerclass": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "area": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "city": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "district": {
+        "id": {
           "index": "not_analyzed",
           "type": "string"
         },
-        "s_winner": {
-          "analyzer": "douhao",
+        "title": {
+          "analyzer": "my_ngram_title",
           "type": "string",
           "fields": {
-            "mwinner": {
-              "analyzer": "my_ngram_title",
+            "mtitle": {
+              "index": "not_analyzed",
               "type": "string"
             }
           }
         },
-        "id": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "title": {
-          "analyzer": "my_ngram_title",
-          "type": "string"
-        },
         "site": {
           "index": "not_analyzed",
           "type": "string"
         },
-        "comeintime": {
-          "type": "long"
-        },
         "href": {
           "index": "not_analyzed",
           "type": "string"
         },
-        "infoformat": {
-          "type": "integer"
-        },
         "publishtime": {
           "type": "long"
         },
@@ -233,186 +112,8 @@ curl -XPUT http://127.0.0.1:9800/bidding_all -d '{
           "index": "not_analyzed",
           "type": "string"
         },
-        "toptype": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "subtype": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "projectinfo": {
-          "properties": {
-            "approvecode": {
-              "index": "not_analyzed",
-              "type": "string"
-            },
-            "approvecontent": {
-              "analyzer": "my_ngram",
-              "type": "string"
-            },
-            "approvestatus": {
-              "index": "not_analyzed",
-              "type": "string"
-            },
-            "approvetime": {
-              "index": "not_analyzed",
-              "type": "string"
-            },
-            "approvedept": {
-              "analyzer": "my_ngram",
-              "type": "string"
-            },
-            "approvenumber": {
-              "index": "not_analyzed",
-              "type": "string"
-            },
-            "projecttype": {
-              "index": "not_analyzed",
-              "type": "string"
-            },
-            "approvecity": {
-              "index": "not_analyzed",
-              "type": "string"
-            }
-          }
-        },
-        "purchasing": {
-          "type": "string",
-          "analyzer": "my_ngram"
-        },
-        "purchasinglist": {
-          "properties": {
-            "itemname": {
-              "index": "not_analyzed",
-              "type": "string"
-            },
-            "model": {
-              "analyzer": "my_ngram",
-              "type": "string"
-            },
-            "unitname": {
-              "index": "not_analyzed",
-              "type": "string"
-            },
-            "number": {
-              "type": "double"
-            },
-            "brandname": {
-              "analyzer": "my_ngram",
-              "type": "string"
-            },
-            "unitprice": {
-              "type": "double"
-            },
-            "totalprice": {
-              "type": "double"
-            }
-          }
-        },
-        "s_topscopeclass": {
-          "analyzer": "douhao",
-          "type": "string"
-        },
-        "topscopeclass": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "s_subscopeclass": {
-          "analyzer": "douhao",
-          "type": "string"
-        },
-        "subscopeclass": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "winnerorder": {
-          "properties": {
-            "sort": {
-              "type": "integer"
-            },
-            "sortstr": {
-              "index": "not_analyzed",
-              "type": "string"
-            },
-            "entname": {
-              "index": "not_analyzed",
-              "type": "string"
-            }
-          }
-        },
-        "project_duration": {
-          "type": "long"
-        },
-        "project_timeunit": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "project_startdate": {
-          "type": "long"
-        },
-        "project_completedate": {
-          "type": "long"
-        },
-        "payway": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "contract_guarantee": {
-          "type": "boolean"
-        },
-        "bid_guarantee": {
-          "type": "boolean"
-        },
-        "qualifies": {
-          "analyzer": "my_ngram",
-          "type": "string"
-        },
-        "entidlist": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "funds": {
-          "analyzer": "my_ngram",
-          "type": "string"
-        },
-        "review_experts": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "bidmethod": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "bidendtime": {
-          "type": "long"
-        },
-        "bidopenaddress": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "docamount": {
-          "type": "double"
-        },
-        "agencyrate": {
-          "type": "double"
-        },
-        "agencyfee": {
-          "type": "double"
-        },
-        "getdocmethod": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
-        "bidway": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
         "extracttype": {
           "type": "long"
-        },
-        "yuceendtime": {
-          "type": "long"
         }
       }
     }

+ 23 - 13
mapping/biddingmapping.txt

@@ -1,4 +1,4 @@
-curl -XPUT http://127.0.0.1:9800/bidding_v2 -d '{
+curl -XPUT http://192.168.3.206:9800/bidding_v2 -d '{
   "settings": {
     "index": {
       "search": {
@@ -57,8 +57,8 @@ curl -XPUT http://127.0.0.1:9800/bidding_v2 -d '{
           }
         }
       },
-      "number_of_shards": "13",
-      "number_of_replicas": "1"
+      "number_of_shards": "15",
+      "number_of_replicas": "0"
     }
   },
   "mappings": {
@@ -345,29 +345,35 @@ curl -XPUT http://127.0.0.1:9800/bidding_v2 -d '{
             "totalprice": {
               "type": "double"
             },
-            "projectname": {
+            "item": {
               "index": "not_analyzed",
               "type": "string"
+            }
+          }
+        },
+        "procurementlist": {
+          "properties": {
+            "projectname": {
+              "analyzer": "my_ngram_title",
+              "type": "string"
             },
             "buyer": {
-              "index": "not_analyzed",
+              "analyzer": "my_ngram_title",
               "type": "string"
             },
             "item": {
-              "index": "not_analyzed",
+              "analyzer": "my_ngram_title",
               "type": "string"
             },
             "projectscope": {
-              "index": "not_analyzed",
+              "analyzer": "my_ngram",
               "type": "string"
             },
-            "expurasingtime": {
-              "index": "not_analyzed",
-              "type": "string"
+            "totalprice": {
+              "type": "double"
             },
-            "reserved_amount": {
-              "index": "not_analyzed",
-              "type": "string"
+            "expurasingtime": {
+              "type": "long"
             }
           }
         },
@@ -485,6 +491,10 @@ curl -XPUT http://127.0.0.1:9800/bidding_v2 -d '{
         },
         "multipackage": {
           "type": "integer"
+        },
+        "bid_field": {
+          "analyzer": "douhao",
+          "type": "string"
         }
       }
     }

+ 2 - 2
mapping/buyer.txt

@@ -1,4 +1,4 @@
-curl -XPUT http://127.0.0.1:9800/buyer_v1 -d '{
+curl -XPUT http://127.0.0.1:19800/buyer_v1 -d '{
   "settings": {
     "index": {
       "search": {
@@ -27,7 +27,7 @@ curl -XPUT http://127.0.0.1:9800/buyer_v1 -d '{
           }
         }
       },
-      "number_of_shards": "13",
+      "number_of_shards": "20",
       "number_of_replicas": "0"
     }
   },

+ 129 - 0
mapping/medical_institution.txt

@@ -0,0 +1,129 @@
+curl -XPUT http://127.0.0.1:19800/medical_institution_v1 -d '{
+  "settings": {
+    "index": {
+      "search": {
+        "showlog": {
+          "threshold": {
+            "query": {
+              "trace": "100ms"
+            },
+            "fetch": {
+              "tract": "100ms"
+            }
+          }
+        }
+      },
+      "analysis": {
+        "analyzer": {
+          "douhao": {
+            "type": "pattern",
+            "pattern": ","
+          },
+          "my_ngram": {
+            "filter": [
+              "lowercase"
+            ],
+            "tokenizer": "my_ngram"
+          }
+        },
+        "tokenizer": {
+          "my_ngram": {
+            "token_chars": [
+              "letter",
+              "digit",
+              "punctuation",
+              "symbol"
+            ],
+            "min_gram": "2",
+            "type": "nGram",
+            "max_gram": "2"
+          }
+        }
+      },
+      "number_of_shards": "15",
+      "number_of_replicas": "0"
+    }
+  },
+  "mappings": {
+    "medical_institution": {
+      "_id": {
+        "path": "company_id"
+      },
+      "_all": {
+        "enabled": false
+      },
+      "properties": {
+        "id": {
+          "type": "long"
+        },
+        "company_id": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "mi_name": {
+          "index": "not_analyzed",
+          "type": "string",
+          "fields": {
+            "p_miname": {
+              "analyzer": "my_ngram",
+              "type": "string"
+            }
+          }
+        },
+        "alias": {
+          "analyzer": "my_ngram",
+          "type": "string",
+          "fields": {
+            "p_alias": {
+              "analyzer": "douhao",
+              "type": "string"
+            }
+          }
+        },
+        "area_code": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "area": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "city": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "district": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "level_code": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "mi_type_code": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "business_type": {
+          "type": "byte"
+        },
+        "sdequipment": {
+          "analyzer": "my_ngram",
+          "type": "string",
+          "fields": {
+            "p_equipment": {
+              "analyzer": "douhao",
+              "type": "string"
+            }
+          }
+        },
+        "bid_num": {
+          "type": "integer"
+        },
+        "field_num": {
+          "type": "integer"
+        }
+      }
+    }
+  }
+}'

+ 2 - 2
mapping/oprd_bidding.txt

@@ -1,4 +1,4 @@
-curl -XPUT http://127.0.0.1:9800/oprd_bidding_v1 -d '
+curl -XPUT http://127.0.0.1:19800/oprd_bidding_v1 -d '
 {
   "settings": {
     "index": {
@@ -58,7 +58,7 @@ curl -XPUT http://127.0.0.1:9800/oprd_bidding_v1 -d '
           }
         }
       },
-      "number_of_shards": "13",
+      "number_of_shards": "20",
       "number_of_replicas": "0"
     }
   },

+ 2 - 2
mapping/oprd_project.txt

@@ -1,4 +1,4 @@
-curl -XPUT http://127.0.0.1:9800/oprd_projectset_v1 -d '{
+curl -XPUT http://127.0.0.1:19800/oprd_projectset_v1 -d '{
   "settings": {
     "index": {
       "search": {
@@ -38,7 +38,7 @@ curl -XPUT http://127.0.0.1:9800/oprd_projectset_v1 -d '{
           }
         }
       },
-      "number_of_shards": "13",
+      "number_of_shards": "20",
       "number_of_replicas": "0"
     }
   },

+ 2 - 2
mapping/oprd_qyxy.txt

@@ -1,4 +1,4 @@
-curl -XPUT http://127.0.0.1:9800/oprd_qyxy_v1 -d '{
+curl -XPUT http://127.0.0.1:19800/oprd_qyxy_v1 -d '{
   "settings": {
     "index": {
       "analysis": {
@@ -38,7 +38,7 @@ curl -XPUT http://127.0.0.1:9800/oprd_qyxy_v1 -d '{
           }
         }
       },
-      "number_of_shards": "13",
+      "number_of_shards": "20",
       "number_of_replicas": "0"
     }
   },

+ 2 - 2
mapping/project-forecast.txt

@@ -1,4 +1,4 @@
-curl -XPUT http://127.0.0.1:9800/forecast_v2 -d '{
+curl -XPUT http://127.0.0.1:19800/forecast_v2 -d '{
   "settings": {
     "index": {
       "analysis": {
@@ -43,7 +43,7 @@ curl -XPUT http://127.0.0.1:9800/forecast_v2 -d '{
           }
         }
       },
-      "number_of_shards": "13",
+      "number_of_shards": "20",
       "number_of_replicas": "0"
     }
   },

+ 7 - 3
mapping/projectset.txt

@@ -1,4 +1,4 @@
-curl -XPUT http://127.0.0.1:9800/projectset_v1 -d '{
+curl -XPUT http://127.0.0.1:19800/projectset_v2 -d '{
   "settings": {
     "index": {
       "search": {
@@ -38,8 +38,8 @@ curl -XPUT http://127.0.0.1:9800/projectset_v1 -d '{
           }
         }
       },
-      "number_of_shards": "13",
-      "number_of_replicas": "1"
+      "number_of_shards": "20",
+      "number_of_replicas": "0"
     }
   },
   "mappings": {
@@ -460,6 +460,10 @@ curl -XPUT http://127.0.0.1:9800/projectset_v1 -d '{
         "first_cooperation": {
           "index": "not_analyzed",
           "type": "string"
+        },
+        "bid_field": {
+          "analyzer": "douhao",
+          "type": "string"
         }
       }
     }

+ 3 - 3
mapping/qyxy-ent.txt

@@ -1,4 +1,4 @@
-curl -XPUT http://127.0.0.1:9800/qyxy_v2 -d '{
+curl -XPUT http://127.0.0.1:19800/qyxy_v2 -d '{
 "settings": {
   "index": {
     "analysis": {
@@ -55,8 +55,8 @@ curl -XPUT http://127.0.0.1:9800/qyxy_v2 -d '{
         }
       }
     },
-    "number_of_shards": "13",
-    "number_of_replicas": "1"
+    "number_of_shards": "20",
+    "number_of_replicas": "0"
   }
 },
 "mappings": {

+ 118 - 0
mapping/supplier_product.txt

@@ -0,0 +1,118 @@
+curl -XPUT http://127.0.0.1:19800/supplier_product_v2 -d '{
+  "settings": {
+    "index": {
+      "search": {
+        "showlog": {
+          "threshold": {
+            "query": {
+              "trace": "100ms"
+            },
+            "fetch": {
+              "tract": "100ms"
+            }
+          }
+        }
+      },
+      "analysis": {
+        "analyzer": {
+          "my_ngram_title": {
+            "filter": [
+              "lowercase"
+            ],
+            "tokenizer": "my_ngram_title"
+          },
+          "my_ngram": {
+            "tokenizer": "my_ngram"
+          }
+        },
+        "tokenizer": {
+          "my_ngram_title": {
+            "token_chars": [
+              "letter",
+              "digit",
+              "punctuation",
+              "symbol"
+            ],
+            "min_gram": "1",
+            "type": "nGram",
+            "max_gram": "1"
+          },
+          "my_ngram": {
+            "min_gram": "2",
+            "type": "nGram",
+            "max_gram": "2"
+          }
+        }
+      },
+      "number_of_shards": "15",
+      "number_of_replicas": "0"
+    }
+  },
+  "mappings": {
+    "supplier_product": {
+      "_id": {
+        "path": "company_id"
+      },
+      "_all": {
+        "enabled": false
+      },
+      "properties": {
+        "id": {
+          "type": "long"
+        },
+        "company_id": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "supplier": {
+          "index": "not_analyzed",
+          "type": "string",
+          "fields": {
+            "p_supplier": {
+              "analyzer": "my_ngram",
+              "type": "string"
+            }
+          }
+        },
+        "area_code": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "area": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "city": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "district": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "business_model": {
+          "type": "byte"
+        },
+        "productlist": {
+          "properties": {
+            "name": {
+              "analyzer": "my_ngram",
+              "type": "string"
+            },
+            "brand": {
+              "analyzer": "my_ngram_title",
+              "type": "string"
+            },
+            "model": {
+              "analyzer": "my_ngram_title",
+              "type": "string"
+            }
+          }
+        },
+        "bid_num": {
+          "type": "integer"
+        }
+      }
+    }
+  }
+}'

+ 2 - 2
mapping/supplyinfo.txt

@@ -1,4 +1,4 @@
-curl -XPUT http://127.0.0.1:9800/supplyinfo_v1 -d '
+curl -XPUT http://127.0.0.1:19800/supplyinfo_v1 -d '
 {
   "settings": {
     "index": {
@@ -42,7 +42,7 @@ curl -XPUT http://127.0.0.1:9800/supplyinfo_v1 -d '
           }
         }
       },
-      "number_of_shards": "13",
+      "number_of_shards": "20",
       "number_of_replicas": "0"
     }
   },

+ 12 - 16
mapping/tool.txt

@@ -1,16 +1,15 @@
 // 新增某字段mapping
-curl -XPUT http://192.168.3.206:9800/supplyinfo_v1/supplyinfo/_mapping -d '
+curl -XPUT http://127.0.0.1:19800/supplier_product_v1/supplier_product/_mapping -d '
 {
   "properties": {
-    "ent_id": {
-      "index": "not_analyzed",
-      "type": "string"
+    "bid_num": {
+      "type": "integer"
     }
-  }
+	}
 }'
 
 //开启节点平衡
-curl -XPUT http://127.0.0.1:9800/_cluster/settings -d'{
+curl -XPUT http://192.168.3.206:9800/_cluster/settings -d'{
   "transient" : {
     "cluster.routing.allocation.enable" : "all"
   }
@@ -40,8 +39,8 @@ curl -XPOST 'http://127.0.0.1:9800/_cluster/reroute' -d '{
     "commands" : [ {
         "move" : 
             {
-              "index": "projectset_v1", "shard": 3, 
-              "from_node": "node_14", "to_node": "node_3"
+              "index": "qyxy_v2", "shard": 12, 
+              "from_node": "node_12", "to_node": "node_1"
             }
         }
     ]
@@ -67,22 +66,19 @@ curl -XPOST '192.168.3.206:9800/_cluster/reroute' -d '{
 }'
 
 //新增某字段mapping
-curl -XPUT http://127.0.0.1:9800/bidding_v2/bidding/_mapping -d '
+curl -XPUT http://127.0.0.1:9800/bidding_v1/bidding/_mapping -d '
 {
 	"properties": {
-    "yucestarttime": {
-      "type": "long"
-    },
-    "yuceendtime": {
-      "type": "long"
+    "isValidFile": {
+      "type": "boolean"
     }
 	}
 }'
 
-curl -XPUT http://127.0.0.1:9800/qyxy_v1/qyxy/_mapping -d '
+curl -XPUT http://127.0.0.1:9800/bidding_v1/bidding/_mapping -d '
 {
 	"properties": {
-    "company_type_int": {
+    "dataweight": {
       "type": "integer"
     }
 	}

+ 2 - 2
mapping/winner.txt

@@ -1,4 +1,4 @@
-curl -XPUT http://192.168.3.206:9800/winner_v1 -d '{
+curl -XPUT http://127.0.0.1:19800/winner_v1 -d '{
 "settings": {
   "index": {
     "analysis": {
@@ -15,7 +15,7 @@ curl -XPUT http://192.168.3.206:9800/winner_v1 -d '{
         }
       }
     },
-    "number_of_shards": "2",
+    "number_of_shards": "20",
     "number_of_replicas": "0"
   }
 },

+ 11 - 11
mapping/更换索引库索引名称.txt

@@ -12,40 +12,40 @@ curl -XPOST http://127.0.0.1:9800/_aliases -d '
     ]
 }'
 
-curl -XPOST http://127.0.0.1:9800/_aliases -d '
+curl -XPOST http://127.0.0.1:19800/_aliases -d '
 {
     "actions": [
         { "remove": {
             "alias": "projectset",
-            "index": "projectset_v2"
+            "index": "projectset_v1"
         }},
         { "add": {
             "alias": "projectset",
-            "index": "projectset_v1"
+            "index": "projectset_v2"
         }}
     ]
 }'
 
-curl -XPOST http://127.0.0.1:9800/_aliases -d '
+curl -XPOST http://127.0.0.1:19800/_aliases -d '
 {
     "actions": [
         { "remove": {
-            "alias": "buyer",
-            "index": "buyer_v2"
+            "alias": "supplier_product",
+            "index": "supplier_product_v1"
         }},
         { "add": {
-            "alias": "buyer",
-            "index": "buyer_v1"
+            "alias": "supplier_product",
+            "index": "supplier_product_v2"
         }}
     ]
 }'
 
-curl -XPOST http://127.0.0.1:9800/_aliases -d '
+curl -XPOST http://127.0.0.1:19800/_aliases -d '
 {
     "actions": [
         { "add": {
-            "alias": "supplyinfo",
-            "index": "supplyinfo_v1"
+            "alias": "supplier_product",
+            "index": "supplier_product_v1"
         }}
     ]
 }'

+ 9 - 1
mapping/注意.txt

@@ -1,4 +1,12 @@
 bidding索引:
 	1、biddingindex和biddingall生索引的json文件不一样(filetext,purchasing,purchasinglist)
 	2、filetext,purchasing,purchasinglist生索引目前在定时任务中,后续改入biddingindex
-	
+	
+
+
+
+
+
+
+老es环境 26个分片
+新es环境 20个分片