瀏覽代碼

no message

Jianghan 2 年之前
父節點
當前提交
629013a8ce
共有 7 個文件被更改,包括 252 次插入31 次删除
  1. 16 1
      mapping/biddingmapping.txt
  2. 88 0
      mapping/medcal_dealer.txt
  3. 3 16
      mapping/projectset.txt
  4. 8 2
      mapping/qyxy-ent.txt
  5. 113 0
      mapping/test.txt
  6. 15 3
      mapping/tool.txt
  7. 9 9
      mapping/更换索引库索引名称.txt

+ 16 - 1
mapping/biddingmapping.txt

@@ -453,7 +453,22 @@ curl -XPUT http://127.0.0.1:19800/bidding_v1 -d '{
         "bid_field": {
           "analyzer": "douhao",
           "type": "string"
-        }
+        },
+        "bidstarttime": {
+          "type": "long"
+        },
+        "docendtime": {
+          "type": "long"
+        },
+        "docstarttime": {
+          "type": "long"
+        },
+        "signendtime": {
+          "type": "long"
+        },
+        "signstarttime": {
+          "type": "long"
+        },
       }
     }
   }

+ 88 - 0
mapping/medcal_dealer.txt

@@ -0,0 +1,88 @@
+curl -XPUT http://127.0.0.1:9800/medical_dealer_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": "2",
+        "number_of_replicas": "0"
+    }
+},
+"mappings": {
+    "medical_dealer": {
+        "_id": {
+            "path": "name_id"
+        },
+        "_all": {
+            "enabled": false
+        },
+        "properties": {
+            "id": {
+                "type": "long"
+            },
+            "company_id": {
+                "index": "not_analyzed",
+                "type": "string"
+            },
+            "dealer_name": {
+                "index": "not_analyzed",
+                "type": "string",
+                "fields": {
+                    "p_miname": {
+                        "analyzer": "my_ngram",
+                        "type": "string"
+                    }
+                }
+            },
+            "area_code": {
+                "index": "not_analyzed",
+                "type": "string"
+            },
+            "city_code": {
+                "index": "not_analyzed",
+                "type": "string"
+            },
+            "district_code": {
+                "index": "not_analyzed",
+                "type": "string"
+            }
+        }
+    }
+}
+}'

+ 3 - 16
mapping/projectset.txt

@@ -1,4 +1,4 @@
-curl -XPUT http://127.0.0.1:19800/projectset_v2 -d '{
+curl -XPUT http://192.168.3.206:9800/projectset_v3 -d '{
   "settings": {
     "index": {
       "search": {
@@ -38,7 +38,7 @@ curl -XPUT http://127.0.0.1:19800/projectset_v2 -d '{
           }
         }
       },
-      "number_of_shards": "20",
+      "number_of_shards": "2",
       "number_of_replicas": "0"
     }
   },
@@ -212,10 +212,6 @@ curl -XPUT http://127.0.0.1:19800/projectset_v2 -d '{
               "index": "not_analyzed",
               "type": "string"
             },
-            "projectscope": {
-              "index": "not_analyzed",
-              "type": "string"
-            },
             "multipackage": {
               "type": "long"
             },
@@ -286,10 +282,6 @@ curl -XPUT http://127.0.0.1:19800/projectset_v2 -d '{
               "index": "not_analyzed",
               "type": "string"
             },
-            "bidstatus": {
-              "index": "not_analyzed",
-              "type": "string"
-            },
             "s_winner": {
               "index": "not_analyzed",
               "type": "string"
@@ -322,8 +314,7 @@ curl -XPUT http://127.0.0.1:19800/projectset_v2 -d '{
               "type": "string"
             },
             "bidopentime": {
-              "index": "not_analyzed",
-              "type": "string"
+              "type": "long"
             },
             "district": {
               "index": "not_analyzed",
@@ -382,10 +373,6 @@ curl -XPUT http://127.0.0.1:19800/projectset_v2 -d '{
           "index": "not_analyzed",
           "type": "string"
         },
-        "extractpos": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
         "ids": {
           "index": "not_analyzed",
           "type": "string"

+ 8 - 2
mapping/qyxy-ent.txt

@@ -1,4 +1,4 @@
-curl -XPUT http://127.0.0.1:19800/qyxy_v2 -d '{
+curl -XPUT http://127.0.0.1:19800/qyxy_v1 -d '{
 "settings": {
   "index": {
     "analysis": {
@@ -55,7 +55,7 @@ curl -XPUT http://127.0.0.1:19800/qyxy_v2 -d '{
         }
       }
     },
-    "number_of_shards": "20",
+    "number_of_shards": "15",
     "number_of_replicas": "0"
   }
 },
@@ -281,6 +281,12 @@ curl -XPUT http://127.0.0.1:19800/qyxy_v2 -d '{
       "tag_business": {
         "index": "not_analyzed",
         "type": "string"
+      },
+      "cancel_date_unix": {
+        "type": "long"
+      },
+      "employee_num": {
+        "type": "integer"
       }
     }
   }

+ 113 - 0
mapping/test.txt

@@ -0,0 +1,113 @@
+curl -XPUT http://192.168.3.71:29200/qyxy_v1 -H 'content-Type:application/json' -d '{
+  "settings": {
+    "analysis": {
+      "analyzer": {
+        "my_ngram_title": {
+          "filter": [
+            "lowercase"
+          ],
+          "tokenizer": "my_ngram_title"
+        },
+        "my_ngram": {
+          "filter": [
+            "lowercase"
+          ],
+          "tokenizer": "my_ngram"
+        },
+        "douhao": {
+          "type": "pattern",
+          "pattern": ","
+        },
+        "p_ngram": {
+          "filter": [
+            "lowercase"
+          ],
+          "tokenizer": "p_ngram"
+        }
+      },
+      "tokenizer": {
+        "my_ngram_title": {
+          "token_chars": [
+            "letter",
+            "digit",
+            "punctuation",
+            "symbol"
+          ],
+          "min_gram": "1",
+          "type": "ngram",
+          "max_gram": "1"
+        },
+        "my_ngram": {
+          "type": "ngram",
+          "min_gram": "2",
+          "max_gram": "2"
+        },
+        "p_ngram": {
+          "token_chars": [
+            "letter",
+            "digit",
+            "symbol"
+          ],
+          "min_gram": "2",
+          "type": "ngram",
+          "max_gram": "2"
+        }
+      }
+    },
+    "index": {
+      "number_of_shards": 1,
+      "number_of_replicas": 0
+    }
+  },
+  "mappings": {
+    "dynamic": "false",
+    "properties": {
+      "title": {
+        "type": "text",
+        "analyzer": "my_ngram_title"
+      },
+      "company_name": {
+        "type": "keyword"
+      },
+      "company_code": {
+        "type": "keyword"
+      },
+      "tax_code": {
+        "type": "keyword"
+      },
+      "credit_no": {
+        "type": "keyword"
+      },
+      "org_code": {
+        "type": "keyword"
+      },
+      "company_area": {
+        "type": "keyword"
+      },
+      "company_city": {
+        "type": "keyword"
+      },
+      "company_district": {
+        "type": "keyword"
+      },
+      "company_type": {
+        "type": "keyword"
+      },
+      "company_type_int": {
+        "type": "integer"
+      },
+      "legal_person": {
+        "type": "keyword"
+      },
+      "establish_date": {
+        "type": "long"
+      },
+      "capital": {
+        "type": "double"
+      },
+      "updatetime": {
+        "type": "long"
+      }
+    }
+  }
+}'

+ 15 - 3
mapping/tool.txt

@@ -1,9 +1,21 @@
 // 新增某字段mapping
-curl -XPUT http://127.0.0.1:19800/supplier_product_v1/supplier_product/_mapping -d '
+curl -XPUT http://127.0.0.1:19800/bidding_v1/bidding/_mapping -d '
 {
   "properties": {
-    "bid_num": {
-      "type": "integer"
+    "bidstarttime": {
+      "type": "long"
+    },
+    "docendtime": {
+      "type": "long"
+    },
+    "docstarttime": {
+      "type": "long"
+    },
+    "signendtime": {
+      "type": "long"
+    },
+    "signstarttime": {
+      "type": "long"
     }
 	}
 }'

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

@@ -1,13 +1,13 @@
-curl -XPOST http://127.0.0.1:9800/_aliases -d '
+curl -XPOST http://127.0.0.1:19800/_aliases -d '
 {
     "actions": [
         { "remove": {
-            "alias": "forecast",
-            "index": "forecast_v1"
+            "alias": "bidding",
+            "index": "bidding_v2"
         }},
         { "add": {
-            "alias": "forecast",
-            "index": "forecast_v2"
+            "alias": "bidding",
+            "index": "bidding_v1"
         }}
     ]
 }'
@@ -16,12 +16,12 @@ curl -XPOST http://127.0.0.1:19800/_aliases -d '
 {
     "actions": [
         { "remove": {
-            "alias": "projectset",
-            "index": "projectset_v1"
+            "alias": "qyxy",
+            "index": "qyxy_v2"
         }},
         { "add": {
-            "alias": "projectset",
-            "index": "projectset_v2"
+            "alias": "qyxy",
+            "index": "qyxy_v1"
         }}
     ]
 }'