Jianghan 3 gadi atpakaļ
vecāks
revīzija
cedded5863

+ 420 - 0
mapping/biddingall.txt

@@ -0,0 +1,420 @@
+curl -XPUT http://127.0.0.1:9800/bidding_all -d '{
+  "settings": {
+    "index": {
+      "search": {
+        "showlog": {
+          "threshold": {
+            "query": {
+              "trace": "100ms"
+            },
+            "fetch": {
+              "tract": "100ms"
+            }
+          }
+        }
+      },
+      "analysis": {
+        "analyzer": {
+          "my_ngram_title": {
+            "filter": [
+              "lowercase"
+            ],
+            "tokenizer": "my_ngram_title"
+          },
+          "douhao": {
+            "type": "pattern",
+            "pattern": ","
+          },
+          "my_ngram": {
+            "filter": [
+              "lowercase"
+            ],
+            "tokenizer": "my_ngram"
+          }
+        },
+        "tokenizer": {
+          "my_ngram_title": {
+            "token_chars": [
+              "letter",
+              "digit",
+              "punctuation",
+              "symbol"
+            ],
+            "min_gram": "1",
+            "type": "nGram",
+            "max_gram": "1"
+          },
+          "my_ngram": {
+            "token_chars": [
+              "letter",
+              "digit",
+              "punctuation",
+              "symbol"
+            ],
+            "min_gram": "2",
+            "type": "nGram",
+            "max_gram": "2"
+          }
+        }
+      },
+      "number_of_shards": "13",
+      "number_of_replicas": "0"
+    }
+  },
+  "mappings": {
+    "bidding": {
+      "transform": {
+        "lang": "groovy",
+        "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
+      },
+      "_id": {
+        "path": "_id"
+      },
+      "_all": {
+        "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",
+          "fields": {
+            "pname": {
+              "type": "string"
+            }
+          }
+        },
+        "buyerclass": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "area": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "city": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "district": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "s_winner": {
+          "analyzer": "douhao",
+          "type": "string",
+          "fields": {
+            "mwinner": {
+              "analyzer": "my_ngram_title",
+              "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"
+        },
+        "spidercode": {
+          "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"
+        }
+      }
+    }
+  }
+}'

+ 492 - 0
mapping/biddingmapping.txt

@@ -0,0 +1,492 @@
+curl -XPUT http://127.0.0.1:9800/bidding_v2 -d '{
+  "settings": {
+    "index": {
+      "search": {
+        "showlog": {
+          "threshold": {
+            "query": {
+              "trace": "100ms"
+            },
+            "fetch": {
+              "tract": "100ms"
+            }
+          }
+        }
+      },
+      "analysis": {
+        "analyzer": {
+          "my_ngram_title": {
+            "filter": [
+              "lowercase"
+            ],
+            "tokenizer": "my_ngram_title"
+          },
+          "douhao": {
+            "type": "pattern",
+            "pattern": ","
+          },
+          "my_ngram": {
+            "filter": [
+              "lowercase"
+            ],
+            "tokenizer": "my_ngram"
+          }
+        },
+        "tokenizer": {
+          "my_ngram_title": {
+            "token_chars": [
+              "letter",
+              "digit",
+              "punctuation",
+              "symbol"
+            ],
+            "min_gram": "1",
+            "type": "nGram",
+            "max_gram": "1"
+          },
+          "my_ngram": {
+            "token_chars": [
+              "letter",
+              "digit",
+              "punctuation",
+              "symbol"
+            ],
+            "min_gram": "2",
+            "type": "nGram",
+            "max_gram": "2"
+          }
+        }
+      },
+      "number_of_shards": "13",
+      "number_of_replicas": "1"
+    }
+  },
+  "mappings": {
+    "bidding": {
+      "transform": {
+        "lang": "groovy",
+        "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
+      },
+      "_id": {
+        "path": "_id"
+      },
+      "_all": {
+        "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"
+            }
+          }
+        },
+        "projectscope": {
+          "index": "not_analyzed",
+          "type": "string",
+          "fields": {
+            "pscope": {
+              "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",
+          "fields": {
+            "pname": {
+              "analyzer": "my_ngram_title",
+              "type": "string"
+            }
+          }
+        },
+        "bidstatus": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "buyerclass": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "topscopeclass": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "s_subscopeclass": {
+          "analyzer": "douhao",
+          "type": "string"
+        },
+        "area": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "city": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "district": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "s_winner": {
+          "analyzer": "douhao",
+          "type": "string",
+          "fields": {
+            "mwinner": {
+              "analyzer": "my_ngram_title",
+              "type": "string"
+            }
+          }
+        },
+        "id": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "title": {
+          "analyzer": "my_ngram_title",
+          "type": "string",
+          "fields": {
+            "mtitle": {
+              "index": "not_analyzed",
+              "type": "string"
+            }
+          }
+        },
+        "detail": {
+          "analyzer": "my_ngram",
+          "type": "string"
+        },
+        "site": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "comeintime": {
+          "type": "long"
+        },
+        "href": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "infoformat": {
+          "type": "integer"
+        },
+        "publishtime": {
+          "type": "long"
+        },
+        "spidercode": {
+          "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"
+            }
+          }
+        },
+        "filetext": {
+          "type": "string",
+          "analyzer": "my_ngram"
+        },
+        "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"
+            },
+            "projectname": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "buyer": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "item": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "projectscope": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "expurasingtime": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "reserved_amount": {
+              "index": "not_analyzed",
+              "type": "string"
+            }
+          }
+        },
+        "tagname": {
+          "analyzer": "douhao",
+          "type": "string"
+        },
+        "s_topscopeclass": {
+          "analyzer": "douhao",
+          "type": "string"
+        },
+        "channel": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "winnerorder": {
+          "properties": {
+            "sort": {
+              "type": "integer"
+            },
+            "sortstr": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "entname": {
+              "index": "not_analyzed",
+              "type": "string"
+            }
+          }
+        },
+        "project_scale": {
+          "analyzer": "my_ngram",
+          "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"
+        },
+        "china_bidding": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "yuceendtime": {
+          "type": "long"
+        },
+        "createtime": {
+          "type": "long"
+        },
+        "purchasing_tag": {
+          "analyzer": "douhao",
+          "type": "string"
+        },
+        "multipackage": {
+          "type": "integer"
+        }
+      }
+    }
+  }
+}'

+ 0 - 78
mapping/buyer.json

@@ -1,78 +0,0 @@
-curl -XPUT http://192.168.3.11:9800/buyer_v6 -d '{
-  "settings": {
-    "index": {
-      "analysis": {
-        "analyzer": {
-          "my_ngram": {
-            "tokenizer": "my_ngram"
-          }
-        },
-        "tokenizer": {
-          "my_ngram": {
-            "min_gram": "2",
-            "type": "nGram",
-            "max_gram": "2"
-          }
-        }
-      },
-      "number_of_shards": "5",
-      "number_of_replicas": "0"
-    }
-  },
-  "mappings": {
-    "buyer": {
-      "transform": {
-        "lang": "groovy",
-        "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
-      },
-      "_id": {
-        "path": "_id"
-      },
-      "_all": {
-        "enabled": false
-      },
-      "properties": {
-		"name":{
-		  "analyzer": "my_ngram",
-		  "type": "string"
-		},
-		"buyer_name": {
-			"index": "not_analyzed",
-			"type": "string"
-		},
-		"institute_type": {
-			"index": "not_analyzed",
-			"type": "string"
-		},
-		"buyerclass": {
-			"index": "not_analyzed",
-			"type": "string"
-		},	
-		"fixedphone": {
-			"index": "not_analyzed",
-			"type": "string"
-		},	
-		"mobilephone": {
-			"index": "not_analyzed",
-			"type": "string"
-		},	
-		"latestfixedphone": {
-			"index": "not_analyzed",
-			"type": "string"
-		},	
-		"latestmobilephone": {
-			"index": "not_analyzed",
-			"type": "string"
-		},
-		"province": {
-			"index": "not_analyzed",
-			"type": "string"
-		},
-		"city": {
-			"index": "not_analyzed",
-			"type": "string"
-		}	
-      }
-    }
-  }
-}'

+ 38 - 15
mapping/winner.json → mapping/buyer.txt

@@ -1,6 +1,18 @@
-curl -XPUT http://192.168.3.11:9800/winner_v1 -d '{
+curl -XPUT http://127.0.0.1:9800/buyer_v1 -d '{
   "settings": {
     "index": {
+      "search": {
+        "showlog": {
+          "threshold": {
+            "query": {
+              "trace": "100ms"
+            },
+            "fetch": {
+              "tract": "100ms"
+            }
+          }
+        }
+      },
       "analysis": {
         "analyzer": {
           "my_ngram": {
@@ -15,12 +27,12 @@ curl -XPUT http://192.168.3.11:9800/winner_v1 -d '{
           }
         }
       },
-      "number_of_shards": "2",
+      "number_of_shards": "13",
       "number_of_replicas": "0"
     }
   },
   "mappings": {
-    "winner": {
+    "buyer": {
       "transform": {
         "lang": "groovy",
         "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
@@ -32,32 +44,43 @@ curl -XPUT http://192.168.3.11:9800/winner_v1 -d '{
         "enabled": false
       },
       "properties": {
-        "winnersign": {
-          "type": "long"
-        },
-        "l_createtime": {
-          "type": "long"
-        },
         "name": {
           "analyzer": "my_ngram",
           "type": "string"
         },
-        "id": {
+        "buyer_name": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "institute_type": {
           "index": "not_analyzed",
           "type": "string"
         },
-        "pici": {
-          "type": "long"
+        "buyerclass": {
+          "index": "not_analyzed",
+          "type": "string"
         },
-        "province": {
+        "fixedphone": {
           "index": "not_analyzed",
           "type": "string"
         },
-        "city": {
+        "mobilephone": {
           "index": "not_analyzed",
           "type": "string"
         },
-        "winner_name": {
+        "latestfixedphone": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "latestmobilephone": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "province": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "city": {
           "index": "not_analyzed",
           "type": "string"
         }

+ 0 - 210
mapping/entmapping.json

@@ -1,210 +0,0 @@
- curl -XPUT http://127.0.0.1:9800/qyxy_v1 -d '{
-  "settings": {
-    "index": {
-	  "analysis": {
-		"analyzer": {
-			"my_ngram": {
-				"filter": [
-					"lowercase"
-				],
-				"tokenizer": "my_ngram"
-			}
-		},
-		"tokenizer": {
-			"my_ngram": {
-				"type": "nGram",
-				"min_gram": "2",
-				"max_gram": "2"
-			}
-		}
-	  },
-      "number_of_shards": "8",
-      "number_of_replicas": "0"
-    }
-  },
-  "mappings": {
-	"qyxy": {
-	  "transform": {
-		"lang": "groovy",
-		"script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
-	  },
-	  "_all": {
-		"enabled": false
-	  },
-	  "_id": {
-		"path": "_id"
-	  },
-	  "properties": {
-		"name": {
-		  "analyzer": "my_ngram",
-		  "type": "string",
-		  "fields": {
-			"ent_name": {
-			  "index": "not_analyzed",
-			  "type": "string"
-			},
-			"ent_ikname": {
-			  "analyzer": "ik_smart",
-			  "type": "string"
-			}
-		  }
-		},
-		"company_name": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"history_name": {
-		  "analyzer": "my_ngram",
-		  "type": "string",
-		  "fields": {
-			  "hname": {
-				"index": "not_analyzed",
-				"type": "string"
-			  }
-		  }
-		},
-		"company_code": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"credit_no": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"org_code": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"tax_code": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"area_code": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"company_area": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"company_city": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"company_district": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"company_type_old": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"company_type": {
-		  "type": "string"
-		},
-		"company_type_int": {
-			"type": "integer"
-		},
-		"legal_person": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"legal_person_certno": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"establish_date": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"lastupdatetime": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"capital": {
-		  "type": "double"
-		},
-		"currency": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"operation_startdate": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"operation_enddate": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"authority": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"issue_date": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"company_status": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"company_address": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"business_scope": {
-		  "type": "string"
-		},
-		"cancel_date": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"revoke_date": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"company_phone": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"company_email": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"stock_name": {
-		  "index": "not_analyzed",
-		  "type": "string"
-		},
-		"partners": {
-		  "properties": {
-			"identify_no": {
-			  "index": "not_analyzed",
-			  "type": "string"
-			},
-			"stock_type": {
-			  "index": "not_analyzed",
-			  "type": "string"
-			},
-			"stock_name": {
-			  "index": "not_analyzed",
-			  "type": "string"
-			},
-			"identify_type": {
-			  "index": "not_analyzed",
-			  "type": "string"
-			},
-			"stock_capital": {
-				"type": "double"
-			},
-			"stock_realcapital": {
-				"type": "double"
-			}
-		  }
-		},
-		"updatetime": {
-		  "type": "long"
-		}
-	  }
-	}
-  }
-}'

+ 222 - 0
mapping/entmapping.txt

@@ -0,0 +1,222 @@
+ curl -XPUT http://127.0.0.1:9800/qyxy_v1 -d '{
+  "settings": {
+    "index": {
+      "search": {
+        "showlog": {
+          "threshold": {
+            "query": {
+              "trace": "100ms"
+            },
+            "fetch": {
+              "tract": "100ms"
+            }
+          }
+        }
+      },
+      "analysis": {
+        "analyzer": {
+          "my_ngram": {
+            "filter": [
+              "lowercase"
+            ],
+            "tokenizer": "my_ngram"
+          }
+        },
+        "tokenizer": {
+          "my_ngram": {
+            "type": "nGram",
+            "min_gram": "2",
+            "max_gram": "2"
+          }
+        }
+      },
+      "number_of_shards": "8",
+      "number_of_replicas": "0"
+    }
+  },
+  "mappings": {
+    "qyxy": {
+      "transform": {
+        "lang": "groovy",
+        "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
+      },
+      "_all": {
+        "enabled": false
+      },
+      "_id": {
+        "path": "_id"
+      },
+      "properties": {
+        "name": {
+          "analyzer": "my_ngram",
+          "type": "string",
+          "fields": {
+            "ent_name": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "ent_ikname": {
+              "analyzer": "ik_smart",
+              "type": "string"
+            }
+          }
+        },
+        "company_name": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "history_name": {
+          "analyzer": "my_ngram",
+          "type": "string",
+          "fields": {
+            "hname": {
+              "index": "not_analyzed",
+              "type": "string"
+            }
+          }
+        },
+        "company_code": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "credit_no": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "org_code": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "tax_code": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "area_code": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_area": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_city": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_district": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_type_old": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_type": {
+          "type": "string"
+        },
+        "company_type_int": {
+          "type": "integer"
+        },
+        "legal_person": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "legal_person_certno": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "establish_date": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "lastupdatetime": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "capital": {
+          "type": "double"
+        },
+        "currency": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "operation_startdate": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "operation_enddate": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "authority": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "issue_date": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_status": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_address": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "business_scope": {
+          "type": "string"
+        },
+        "cancel_date": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "revoke_date": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_phone": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_email": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "stock_name": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "partners": {
+          "properties": {
+            "identify_no": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "stock_type": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "stock_name": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "identify_type": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "stock_capital": {
+              "type": "double"
+            },
+            "stock_realcapital": {
+              "type": "double"
+            }
+          }
+        },
+        "updatetime": {
+          "type": "long"
+        }
+      }
+    }
+  }
+}'

+ 0 - 43
mapping/es查询语句样例.json

@@ -1,43 +0,0 @@
-{
-  "query": {
-    "filtered": {
-      "filter": {
-        "bool": {
-          "must": [
-            {
-              "term": {
-                "buyer": "常熟市古里镇人民政府"
-              }
-            }
-          ]
-        }
-      },
-      "query": {
-        "bool": {
-          "should": [
-            {
-              "multi_match": {
-                "query": "电脑",
-                "type": "phrase",
-                "fields": [
-                  "purchasing",
-                  "projectname"
-                ]
-              }
-            },
-            {
-              "multi_match": {
-                "query": "计算机",
-                "type": "phrase",
-                "fields": [
-                  "purchasing",
-                  "projectname"
-                ]
-              }
-            }
-          ]
-        }
-      }
-    }
-  }
-}

+ 30 - 11
mapping/biddingmapping.json → mapping/oprd_bidding.txt

@@ -1,6 +1,19 @@
-curl -XPUT http://127.0.0.1:9800/bidding_v2 -d '{
+curl -XPUT http://127.0.0.1:9800/oprd_bidding_v1 -d '
+{
   "settings": {
     "index": {
+      "search": {
+        "showlog": {
+          "threshold": {
+            "query": {
+              "trace": "100ms"
+            },
+            "fetch": {
+              "tract": "100ms"
+            }
+          }
+        }
+      },
       "analysis": {
         "analyzer": {
           "my_ngram_title": {
@@ -25,7 +38,7 @@ curl -XPUT http://127.0.0.1:9800/bidding_v2 -d '{
             "token_chars": [
               "letter",
               "digit",
-			        "punctuation",
+              "punctuation",
               "symbol"
             ],
             "min_gram": "1",
@@ -36,7 +49,7 @@ curl -XPUT http://127.0.0.1:9800/bidding_v2 -d '{
             "token_chars": [
               "letter",
               "digit",
-			        "punctuation",
+              "punctuation",
               "symbol"
             ],
             "min_gram": "2",
@@ -45,8 +58,8 @@ curl -XPUT http://127.0.0.1:9800/bidding_v2 -d '{
           }
         }
       },
-      "number_of_shards": "8",
-      "number_of_replicas": "1"
+      "number_of_shards": "13",
+      "number_of_replicas": "0"
     }
   },
   "mappings": {
@@ -172,6 +185,7 @@ curl -XPUT http://127.0.0.1:9800/bidding_v2 -d '{
           "type": "string",
           "fields": {
             "pname": {
+              "analyzer": "my_ngram_title",
               "type": "string"
             }
           }
@@ -386,10 +400,6 @@ curl -XPUT http://127.0.0.1:9800/bidding_v2 -d '{
           "analyzer": "my_ngram",
           "type": "string"
         },
-        "entidlist": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
         "funds": {
           "analyzer": "my_ngram",
           "type": "string"
@@ -426,11 +436,20 @@ curl -XPUT http://127.0.0.1:9800/bidding_v2 -d '{
           "index": "not_analyzed",
           "type": "string"
         },
-        "china_bidding": {
+        "tag_rule": {
+          "analyzer": "douhao",
+          "type": "string"
+        },
+        "entidlist": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "buyertagname": {
           "index": "not_analyzed",
           "type": "string"
         }
       }
     }
   }
-}'
+}
+'

+ 472 - 0
mapping/oprd_project.txt

@@ -0,0 +1,472 @@
+curl -XPUT http://127.0.0.1:9800/oprd_projectset_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"
+            ],
+            "min_gram": "2",
+            "type": "nGram",
+            "max_gram": "2"
+          }
+        }
+      },
+      "number_of_shards": "13",
+      "number_of_replicas": "0"
+    }
+  },
+  "mappings": {
+    "projectset": {
+      "transform": {
+        "lang": "groovy",
+        "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
+      },
+      "_id": {
+        "path": "_id"
+      },
+      "_all": {
+        "enabled": false
+      },
+      "properties": {
+        "exception": {
+          "type": "integer"
+        },
+        "projecthref": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "firsttime": {
+          "type": "long"
+        },
+        "city": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "projectcode": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "jgtime": {
+          "type": "long"
+        },
+        "projectscope": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "multipackage": {
+          "type": "integer"
+        },
+        "subscopeclass": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "contractcode": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "sortprice": {
+          "type": "double"
+        },
+        "s_projectname": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "sourceinfourl": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "id": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "budget": {
+          "type": "double"
+        },
+        "s_subscopeclass": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "area": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "budgettag": {
+          "type": "long"
+        },
+        "mpc": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "bidamount": {
+          "type": "double"
+        },
+        "createtime": {
+          "type": "long"
+        },
+        "projectname": {
+          "index": "not_analyzed",
+          "type": "string",
+          "fields": {
+            "pname": {
+              "analyzer": "my_ngram",
+              "type": "string"
+            }
+          }
+        },
+        "buyertel": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "listtag": {
+          "type": "integer"
+        },
+        "bidstatus": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "s_winner": {
+          "analyzer": "douhao",
+          "type": "string",
+          "fields": {
+            "mwinner": {
+              "analyzer": "my_ngram",
+              "type": "string"
+            }
+          }
+        },
+        "agency": {
+          "index": "not_analyzed",
+          "type": "string",
+          "fields": {
+            "magency": {
+              "analyzer": "my_ngram",
+              "type": "string"
+            }
+          }
+        },
+        "buyer": {
+          "index": "not_analyzed",
+          "type": "string",
+          "fields": {
+            "mbuyer": {
+              "analyzer": "my_ngram",
+              "type": "string"
+            }
+          }
+        },
+        "bidamounttag": {
+          "type": "long"
+        },
+        "mpn": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "package1": {
+          "properties": {
+            "bidamount": {
+              "type": "long"
+            },
+            "winner": {
+              "index": "not_analyzed",
+              "type": "string"
+            }
+          }
+        },
+        "pici": {
+          "type": "long"
+        },
+        "list": {
+          "properties": {
+            "city": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "projectcode": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "projectscope": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "multipackage": {
+              "type": "long"
+            },
+            "title": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "subscopeclass": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "comeintime": {
+              "type": "long"
+            },
+            "contractcode": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "toptype": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "spidercode": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "subtype": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "infoformat": {
+              "type": "long"
+            },
+            "href": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "pjVal": {
+              "type": "long"
+            },
+            "budget": {
+              "type": "long"
+            },
+            "area": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "bidamount": {
+              "type": "long"
+            },
+            "projectname": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "buyertel": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "infoid": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "agency": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "compareStr": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "bidstatus": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "s_winner": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "resVal": {
+              "type": "long"
+            },
+            "buyer": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "buyerclass": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "site": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "winner": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "winnertel": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "winnerperson": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "bidopentime": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "district": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "publishtime": {
+              "type": "long"
+            },
+            "topscopeclass": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "buyerperson": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "project_startdate": {
+              "type": "long"
+            },
+            "project_completedate": {
+              "type": "long"
+            }
+          }
+        },
+        "bidtype": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "buyerclass": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "sourceinfoid": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "lasttime": {
+          "type": "long"
+        },
+        "winner": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "winnertel": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "winnerperson": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "bidopentime": {
+          "type": "long"
+        },
+        "district": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "extractpos": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "ids": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "project_rate": {
+          "type": "double"
+        },
+        "topscopeclass": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "buyerperson": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "zbtime": {
+          "type": "long"
+        },
+        "purchasing": {
+          "type": "string",
+          "analyzer": "my_ngram"
+        },
+        "review_experts": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "winnerorder": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "prate_flag": {
+          "type": "integer"
+        },
+        "bidcycle": {
+          "type": "integer"
+        },
+        "project_startdate": {
+          "type": "long"
+        },
+        "project_scale": {
+          "analyzer": "my_ngram",
+          "type": "string"
+        },
+        "project_duration": {
+          "type": "long"
+        },
+        "project_timeunit": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "payway": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "contract_guarantee": {
+          "type": "boolean"
+        },
+        "bid_guarantee": {
+          "type": "boolean"
+        },
+        "qualifies": {
+          "analyzer": "my_ngram",
+          "type": "string"
+        },
+        "tag_rule": {
+          "analyzer": "douhao",
+          "type": "string"
+        },
+        "isOperators": {
+          "type": "boolean"
+        },
+        "entidlist": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "buyertagname": {
+          "index": "not_analyzed",
+          "type": "string"
+        }
+      }
+    }
+  }
+}'
+

+ 244 - 0
mapping/oprd_qyxy.txt

@@ -0,0 +1,244 @@
+curl -XPUT http://127.0.0.1:9800/oprd_qyxy_v1 -d '{
+  "settings": {
+    "index": {
+      "analysis": {
+        "analyzer": {
+          "my_ngram": {
+            "filter": [
+              "lowercase"
+            ],
+            "tokenizer": "my_ngram"
+          },
+          "douhao": {
+            "type": "pattern",
+            "pattern": ","
+          },
+          "p_ngram": {
+            "filter": [
+              "lowercase"
+            ],
+            "tokenizer": "p_ngram"
+          }
+        },
+        "tokenizer": {
+          "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"
+          }
+        }
+      },
+      "number_of_shards": "13",
+      "number_of_replicas": "0"
+    }
+  },
+  "mappings": {
+    "qyxy": {
+      "transform": {
+        "lang": "groovy",
+        "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
+      },
+      "_all": {
+        "enabled": false
+      },
+      "_id": {
+        "path": "_id"
+      },
+      "properties": {
+        "name": {
+          "analyzer": "my_ngram",
+          "type": "string",
+          "fields": {
+            "ent_name": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "ent_ikname": {
+              "analyzer": "ik_smart",
+              "type": "string"
+            }
+          }
+        },
+        "company_name": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "history_name": {
+          "analyzer": "my_ngram",
+          "type": "string",
+          "fields": {
+            "hname": {
+              "index": "not_analyzed",
+              "type": "string"
+            }
+          }
+        },
+        "company_code": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "tax_code": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "credit_no": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "org_code": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_area": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_city": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_district": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_type_old": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_type": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_type_int": {
+          "type": "integer"
+        },
+        "legal_person": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "establish_date": {
+          "type": "long"
+        },
+        "lastupdatetime": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "capital": {
+          "type": "double"
+        },
+        "currency": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "operation_startdate": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "operation_enddate": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "authority": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "issue_date": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_status": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_address": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "business_scope": {
+          "analyzer": "my_ngram",
+          "type": "string"
+        },
+        "cancel_date": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "revoke_date": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_phone": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "company_email": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "stock_name": {
+          "analyzer": "douhao",
+          "type": "string"
+        },
+        "partners": {
+          "properties": {
+            "identify_no": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "stock_type": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "stock_name": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "identify_type": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "stock_capital": {
+              "type": "double"
+            },
+            "stock_realcapital": {
+              "type": "double"
+            }
+          }
+        },
+        "updatetime": {
+          "type": "long"
+        },
+        "employees": {
+          "properties": {
+            "employee_name": {
+              "index": "not_analyzed",
+              "type": "string"
+            },
+            "position": {
+              "index": "not_analyzed",
+              "type": "string"
+            }
+          }
+        },
+        "employee_name": {
+          "analyzer": "douhao",
+          "type": "string"
+        },
+        "company_shortname": {
+          "index": "not_analyzed",
+          "type": "string"
+        }
+      }
+    }
+  }
+}'
+  

+ 185 - 0
mapping/project-forecast.txt

@@ -0,0 +1,185 @@
+curl -XPUT http://127.0.0.1:9800/forecast_v2 -d '{
+  "settings": {
+    "index": {
+      "analysis": {
+        "analyzer": {
+          "douhao": {
+            "type": "pattern",
+            "pattern": ","
+          },
+          "my_ngram_title": {
+            "filter": [
+              "lowercase"
+            ],
+            "tokenizer": "my_ngram_title"
+          },
+          "my_ngram": {
+            "filter": [
+              "lowercase"
+            ],
+            "tokenizer": "my_ngram"
+          }
+        },
+        "tokenizer": {
+          "my_ngram_title": {
+            "token_chars": [
+              "letter",
+              "digit",
+              "punctuation",
+              "symbol"
+            ],
+            "min_gram": "1",
+            "type": "nGram",
+            "max_gram": "1"
+          },
+          "my_ngram": {
+            "token_chars": [
+              "letter",
+              "digit"
+            ],
+            "min_gram": "2",
+            "type": "nGram",
+            "max_gram": "2"
+          }
+        }
+      },
+      "number_of_shards": "13",
+      "number_of_replicas": "0"
+    }
+  },
+  "mappings": {
+    "forecast": {
+      "transform": {
+        "lang": "groovy",
+        "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
+      },
+      "_id": {
+        "path": "_id"
+      },
+      "_all": {
+        "enabled": false
+      },
+      "properties": {
+        "area": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "city": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "nature": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "buyer": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "buyerclass": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "title": {
+          "analyzer": "my_ngram_title",
+          "type": "string"
+        },
+        "projectname": {
+          "index": "not_analyzed",
+          "type": "string",
+          "fields": {
+            "pname": {
+              "type": "string"
+            }
+          }
+        },
+        "projectcode": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "spidercode": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "stage": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "main_project": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "top_category": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "sub_category": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "approvestatus": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "href": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "jyhref": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "publishtime": {
+          "type": "long"
+        },
+        "yucetime": {
+          "type": "long"
+        },
+        "yucestarttime": {
+          "type": "long"
+        },
+        "yuceendtime": {
+          "type": "long"
+        },
+        "results": {
+          "properties": {
+            "purchasing": {
+              "analyzer": "douhao",
+              "type": "string",
+              "fields": {
+                "mypurchasing": {
+                  "analyzer": "my_ngram_title",
+                  "type": "string"
+                }
+              }
+            },
+            "p_projects": {
+              "properties": {
+                "p_purchasing": {
+                  "index": "not_analyzed",
+                  "type": "string"
+                },
+                "p_id": {
+                  "index": "not_analyzed",
+                  "type": "string"
+                },
+                "p_orther": {
+                  "index": "not_analyzed",
+                  "type": "string"
+                },
+                "p_phone": {
+                  "index": "not_analyzed",
+                  "type": "string"
+                },
+                "p_person": {
+                  "index": "not_analyzed",
+                  "type": "string"
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}'

+ 47 - 13
mapping/projectset.json → mapping/projectset.txt

@@ -1,6 +1,18 @@
-curl -XPUT http://192.168.3.206:9800/projectset_v1 -d '{
+curl -XPUT http://127.0.0.1:9800/projectset_v1 -d '{
   "settings": {
     "index": {
+      "search": {
+        "showlog": {
+          "threshold": {
+            "query": {
+              "trace": "100ms"
+            },
+            "fetch": {
+              "tract": "100ms"
+            }
+          }
+        }
+      },
       "analysis": {
         "analyzer": {
           "douhao": {
@@ -26,8 +38,8 @@ curl -XPUT http://192.168.3.206:9800/projectset_v1 -d '{
           }
         }
       },
-      "number_of_shards": "4",
-      "number_of_replicas": "0"
+      "number_of_shards": "13",
+      "number_of_replicas": "1"
     }
   },
   "mappings": {
@@ -42,7 +54,7 @@ curl -XPUT http://192.168.3.206:9800/projectset_v1 -d '{
       "_all": {
         "enabled": false
       },
-	  "properties":{
+      "properties": {
         "exception": {
           "type": "integer"
         },
@@ -132,10 +144,6 @@ curl -XPUT http://192.168.3.206:9800/projectset_v1 -d '{
           "index": "not_analyzed",
           "type": "string"
         },
-        "agency": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
         "listtag": {
           "type": "integer"
         },
@@ -145,7 +153,33 @@ curl -XPUT http://192.168.3.206:9800/projectset_v1 -d '{
         },
         "s_winner": {
           "analyzer": "douhao",
-          "type": "string"
+          "type": "string",
+          "fields": {
+            "mwinner": {
+              "analyzer": "my_ngram",
+              "type": "string"
+            }
+          }
+        },
+        "agency": {
+          "index": "not_analyzed",
+          "type": "string",
+          "fields": {
+            "magency": {
+              "analyzer": "my_ngram",
+              "type": "string"
+            }
+          }
+        },
+        "buyer": {
+          "index": "not_analyzed",
+          "type": "string",
+          "fields": {
+            "mbuyer": {
+              "analyzer": "my_ngram",
+              "type": "string"
+            }
+          }
         },
         "bidamounttag": {
           "type": "long"
@@ -314,10 +348,6 @@ curl -XPUT http://192.168.3.206:9800/projectset_v1 -d '{
             }
           }
         },
-        "buyer": {
-          "index": "not_analyzed",
-          "type": "string"
-        },
         "bidtype": {
           "index": "not_analyzed",
           "type": "string"
@@ -426,6 +456,10 @@ curl -XPUT http://192.168.3.206:9800/projectset_v1 -d '{
         "entidlist": {
           "index": "not_analyzed",
           "type": "string"
+        },
+        "first_cooperation": {
+          "index": "not_analyzed",
+          "type": "string"
         }
       }
     }

+ 0 - 263
mapping/qyxy-ent.json

@@ -1,263 +0,0 @@
-curl -XPUT http://127.0.0.1:9800/qyxy_v2 -d '{
-    "settings": {
-      "index": {
-        "analysis": {
-          "analyzer": {
-              "my_ngram": {
-                  "filter": [
-                      "lowercase"
-                  ],
-                  "tokenizer": "my_ngram"
-              },
-              "douhao": {
-                "type": "pattern",
-                "pattern": ","
-              },
-              "p_ngram": {
-                "filter": [
-                  "lowercase"
-                ],
-                "tokenizer": "p_ngram"
-              }
-          },
-          "tokenizer": {
-              "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"
-              }
-          }
-        },
-        "number_of_shards": "8",
-        "number_of_replicas": "0"
-      }
-    },
-    "mappings": {
-      "qyxy": {
-        "transform": {
-          "lang": "groovy",
-          "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
-        },
-        "_all": {
-          "enabled": false
-        },
-        "_id": {
-          "path": "_id"
-        },
-        "properties": {
-          "name": {
-            "analyzer": "my_ngram",
-            "type": "string",
-            "fields": {
-              "ent_name": {
-                "index": "not_analyzed",
-                "type": "string"
-              },
-              "ent_ikname": {
-                "analyzer": "ik_smart",
-                "type": "string"
-              }
-            }
-          },
-          "company_name": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "history_name": {
-            "analyzer": "my_ngram",
-            "type": "string",
-            "fields": {
-                "hname": {
-                  "index": "not_analyzed",
-                  "type": "string"
-                }
-            }
-          },
-          "company_code": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "credit_no": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "org_code": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "tax_code": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "area_code": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "company_area": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "company_city": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "company_district": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "company_type_old": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "company_type": {
-            "type": "string"
-          },
-          "company_type_int": {
-              "type": "integer"
-          },
-          "legal_person": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "legal_person_certno": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "establish_date": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "lastupdatetime": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "capital": {
-            "type": "double"
-          },
-          "currency": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "operation_startdate": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "operation_enddate": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "authority": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "issue_date": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "company_status": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "company_address": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "business_scope": {
-            "type": "string"
-          },
-          "cancel_date": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "revoke_date": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "company_phone": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "company_email": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "stock_name": {
-            "analyzer": "douhao",
-            "type": "string"
-          },
-          "partners": {
-            "properties": {
-              "identify_no": {
-                "index": "not_analyzed",
-                "type": "string"
-              },
-              "stock_type": {
-                "index": "not_analyzed",
-                "type": "string"
-              },
-              "stock_name": {
-                "index": "not_analyzed",
-                "type": "string"
-              },
-              "identify_type": {
-                "index": "not_analyzed",
-                "type": "string"
-              },
-              "stock_capital": {
-                  "type": "double"
-              },
-              "stock_realcapital": {
-                  "type": "double"
-              }
-            }
-          },
-          "updatetime": {
-            "type": "long"
-          },
-          "bid_projectname": {
-            "analyzer": "p_ngram",
-            "type": "string"
-          },
-          "bid_purchasing": {
-            "analyzer": "p_ngram",
-            "type": "string"
-          },
-          "search_type": {
-            "index": "not_analyzed",
-            "type": "string"
-          },
-          "employee_name": {
-            "analyzer": "douhao",
-            "type": "string"
-          },
-          "bid_area": {
-            "analyzer": "p_ngram",
-            "type": "string"
-          },
-          "bid_unittype": {
-            "analyzer": "douhao",
-            "type": "string"
-          },
-          "bid_contracttype": {
-            "analyzer": "douhao",
-            "type": "string"
-          },
-          "company_shortname": {
-            "index": "not_analyzed",
-            "type": "string"
-          }
-        }
-      }
-    }
-  }'
-  

+ 289 - 0
mapping/qyxy-ent.txt

@@ -0,0 +1,289 @@
+curl -XPUT http://127.0.0.1:9800/qyxy_v2 -d '{
+"settings": {
+  "index": {
+    "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"
+        }
+      }
+    },
+    "number_of_shards": "13",
+    "number_of_replicas": "1"
+  }
+},
+"mappings": {
+  "qyxy": {
+    "transform": {
+      "lang": "groovy",
+      "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
+    },
+    "_all": {
+      "enabled": false
+    },
+    "_id": {
+      "path": "_id"
+    },
+    "properties": {
+      "name": {
+        "analyzer": "my_ngram",
+        "type": "string",
+        "fields": {
+          "ent_name": {
+            "index": "not_analyzed",
+            "type": "string"
+          },
+          "ent_ikname": {
+            "analyzer": "ik_smart",
+            "type": "string"
+          }
+        }
+      },
+      "company_name": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "history_name": {
+        "analyzer": "my_ngram",
+        "type": "string",
+        "fields": {
+          "hname": {
+            "index": "not_analyzed",
+            "type": "string"
+          }
+        }
+      },
+      "company_code": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "tax_code": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "credit_no": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "org_code": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "company_area": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "company_city": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "company_district": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "company_type_old": {
+        "analyzer": "my_ngram_title",
+        "type": "string"
+      },
+      "company_type": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "company_type_int": {
+        "type": "integer"
+      },
+      "legal_person": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "establish_date": {
+        "type": "long"
+      },
+      "lastupdatetime": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "capital": {
+        "type": "double"
+      },
+      "currency": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "operation_startdate": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "operation_enddate": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "authority": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "issue_date": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "company_status": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "company_address": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "business_scope": {
+        "analyzer": "my_ngram",
+        "type": "string"
+      },
+      "cancel_date": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "revoke_date": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "company_phone": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "company_email": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "stock_name": {
+        "analyzer": "douhao",
+        "type": "string"
+      },
+      "partners": {
+        "properties": {
+          "identify_no": {
+            "index": "not_analyzed",
+            "type": "string"
+          },
+          "stock_type": {
+            "index": "not_analyzed",
+            "type": "string"
+          },
+          "stock_name": {
+            "index": "not_analyzed",
+            "type": "string"
+          },
+          "identify_type": {
+            "index": "not_analyzed",
+            "type": "string"
+          },
+          "stock_capital": {
+            "type": "double"
+          },
+          "stock_realcapital": {
+            "type": "double"
+          }
+        }
+      },
+      "updatetime": {
+        "type": "long"
+      },
+      "bid_projectname": {
+        "analyzer": "p_ngram",
+        "type": "string"
+      },
+      "bid_purchasing": {
+        "analyzer": "p_ngram",
+        "type": "string"
+      },
+      "search_type": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "employees": {
+        "properties": {
+          "employee_name": {
+            "index": "not_analyzed",
+            "type": "string"
+          },
+          "position": {
+            "index": "not_analyzed",
+            "type": "string"
+          }
+        }
+      },
+      "employee_name": {
+        "analyzer": "douhao",
+        "type": "string"
+      },
+      "bid_area": {
+        "analyzer": "p_ngram",
+        "type": "string"
+      },
+      "bid_unittype": {
+        "analyzer": "douhao",
+        "type": "string"
+      },
+      "bid_contracttype": {
+        "analyzer": "douhao",
+        "type": "string"
+      },
+      "company_shortname": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "tag_business": {
+        "index": "not_analyzed",
+        "type": "string"
+      }
+    }
+  }
+}
+}'
+  

+ 112 - 0
mapping/supplyinfo.txt

@@ -0,0 +1,112 @@
+curl -XPUT http://127.0.0.1:9800/supplyinfo_v1 -d '
+{
+  "settings": {
+    "index": {
+      "analysis": {
+        "analyzer": {
+          "my_ngram_title": {
+            "filter": [
+              "lowercase"
+            ],
+            "tokenizer": "my_ngram_title"
+          },
+          "my_ngram": {
+            "filter": [
+              "lowercase"
+            ],
+            "tokenizer": "my_ngram"
+          }
+        },
+        "tokenizer": {
+          "my_ngram_title": {
+            "token_chars": [
+              "letter",
+              "digit",
+              "punctuation",
+              "symbol"
+            ],
+            "min_gram": "1",
+            "type": "nGram",
+            "max_gram": "1"
+          },
+          "my_ngram": {
+            "token_chars": [
+              "letter",
+              "digit",
+              "punctuation",
+              "symbol"
+            ],
+            "min_gram": "2",
+            "type": "nGram",
+            "max_gram": "2"
+          }
+        }
+      },
+      "number_of_shards": "13",
+      "number_of_replicas": "0"
+    }
+  },
+  "mappings": {
+    "supplyinfo": {
+      "transform": {
+        "lang": "groovy",
+        "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
+      },
+      "_id": {
+        "path": "_id"
+      },
+      "_all": {
+        "enabled": false
+      },
+      "properties": {
+        "msg_type": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "title": {
+          "analyzer": "my_ngram_title",
+          "type": "string",
+          "fields": {
+            "mtitle": {
+              "index": "not_analyzed",
+              "type": "string"
+            }
+          }
+        },
+        "id": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "detail": {
+          "analyzer": "my_ngram",
+          "type": "string"
+        },
+        "validity_time": {
+          "type": "long"
+        },
+        "create_time": {
+          "type": "long"
+        },
+        "publish_time": {
+          "type": "long"
+        },
+        "province": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "city": {
+          "index": "not_analyzed",
+          "type": "string"
+        },
+        "ent_name": {
+          "analyzer": "my_ngram_title",
+          "type": "string"
+        },
+        "ent_id": {
+          "index": "not_analyzed",
+          "type": "string"
+        }
+      }
+    }
+  }
+}'

+ 8 - 8
mapping/tool.txt

@@ -1,8 +1,8 @@
 // 新增某字段mapping
-curl -XPUT http://127.0.0.1:9800/qyxy_v2/qyxy/_mapping -d '
+curl -XPUT http://192.168.3.206:9800/supplyinfo_v1/supplyinfo/_mapping -d '
 {
   "properties": {
-    "company_shortname": {
+    "ent_id": {
       "index": "not_analyzed",
       "type": "string"
     }
@@ -36,12 +36,12 @@ curl -XPUT http://192.168.3.206:9800/_cluster/settings -d'{
   }
 }'
 //手动移动节点
-curl -XPOST 'http://192.168.3.206:9800/_cluster/reroute' -d '{
+curl -XPOST 'http://127.0.0.1:9800/_cluster/reroute' -d '{
     "commands" : [ {
         "move" : 
             {
-              "index" : "projectset_v1", "shard" : 0, 
-              "from_node" : "node-4", "to_node" : "node-3"
+              "index": "projectset_v1", "shard": 3, 
+              "from_node": "node_14", "to_node": "node_3"
             }
         }
     ]
@@ -67,13 +67,13 @@ curl -XPOST '192.168.3.206:9800/_cluster/reroute' -d '{
 }'
 
 //新增某字段mapping
-curl -XPUT http://192.168.3.128:9800/projectset_v5/projectset/_mapping -d '
+curl -XPUT http://127.0.0.1:9800/bidding_v2/bidding/_mapping -d '
 {
 	"properties": {
-    "project_startdate": {
+    "yucestarttime": {
       "type": "long"
     },
-    "project_completedate": {
+    "yuceendtime": {
       "type": "long"
     }
 	}

+ 71 - 0
mapping/winner.txt

@@ -0,0 +1,71 @@
+curl -XPUT http://192.168.3.206:9800/winner_v1 -d '{
+"settings": {
+  "index": {
+    "analysis": {
+      "analyzer": {
+        "my_ngram": {
+          "tokenizer": "my_ngram"
+        }
+      },
+      "tokenizer": {
+        "my_ngram": {
+          "min_gram": "2",
+          "type": "nGram",
+          "max_gram": "2"
+        }
+      }
+    },
+    "number_of_shards": "2",
+    "number_of_replicas": "0"
+  }
+},
+"mappings": {
+  "winner": {
+    "transform": {
+      "lang": "groovy",
+      "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
+    },
+    "_id": {
+      "path": "_id"
+    },
+    "_all": {
+      "enabled": false
+    },
+    "properties": {
+      "winnersign": {
+        "type": "long"
+      },
+      "l_createtime": {
+        "type": "long"
+      },
+      "name": {
+        "analyzer": "my_ngram",
+        "type": "string"
+      },
+      "id": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "pici": {
+        "type": "long"
+      },
+      "province": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "city": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "winner_name": {
+        "index": "not_analyzed",
+        "type": "string"
+      },
+      "tag_business": {
+        "index": "not_analyzed",
+        "type": "string"
+      }
+    }
+  }
+}
+}'

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

@@ -2,12 +2,12 @@ curl -XPOST http://127.0.0.1:9800/_aliases -d '
 {
     "actions": [
         { "remove": {
-            "alias": "bidding",
-            "index": "bidding_v1"
+            "alias": "forecast",
+            "index": "forecast_v1"
         }},
         { "add": {
-            "alias": "bidding",
-            "index": "bidding_v2"
+            "alias": "forecast",
+            "index": "forecast_v2"
         }}
     ]
 }'
@@ -16,12 +16,12 @@ curl -XPOST http://127.0.0.1:9800/_aliases -d '
 {
     "actions": [
         { "remove": {
-            "alias": "buyer",
-            "index": "buyer_v2"
+            "alias": "projectset",
+            "index": "projectset_v2"
         }},
         { "add": {
-            "alias": "buyer",
-            "index": "buyer_v1"
+            "alias": "projectset",
+            "index": "projectset_v1"
         }}
     ]
 }'
@@ -30,12 +30,12 @@ curl -XPOST http://127.0.0.1:9800/_aliases -d '
 {
     "actions": [
         { "remove": {
-            "alias": "winner",
-            "index": "winner_v3"
+            "alias": "buyer",
+            "index": "buyer_v2"
         }},
         { "add": {
-            "alias": "winner",
-            "index": "winner_v1"
+            "alias": "buyer",
+            "index": "buyer_v1"
         }}
     ]
 }'
@@ -43,27 +43,43 @@ curl -XPOST http://127.0.0.1:9800/_aliases -d '
 curl -XPOST http://127.0.0.1:9800/_aliases -d '
 {
     "actions": [
-        { "remove": {
-            "alias": "projectset",
-            "index": "projectset_v3"
-        }},
         { "add": {
-            "alias": "projectset",
-            "index": "projectset_v1"
+            "alias": "supplyinfo",
+            "index": "supplyinfo_v1"
         }}
     ]
 }'
 
 curl -XPOST http://192.168.3.206:9800/_aliases -d '
 {
-    "actions": [
-        { "add": {
-            "alias": "bidding",
-            "index": "bidding_v1"
-        }},
-        { "remove": {
-            "alias": "bidding",
-            "index": "bidding_v5"
-        }}
-    ]
+  "actions": [
+    {
+      "remove": {
+        "alias": "bidding",
+        "index": "bidding_v2"
+      },
+      "remove": {
+        "alias": "projectset",
+        "index": "projectset_v5"
+      },
+      "remove": {
+        "alias": "qyxy",
+        "index": "qyxy_v2"
+      }
+    },
+    {
+      "add": {
+        "alias": "bidding",
+        "index": "bidding_v1"
+      },
+      "add": {
+        "alias": "projectset",
+        "index": "projectset_v1"
+      },
+      "add": {
+        "alias": "qyxy",
+        "index": "qyxy_v1"
+      }
+    }
+  ]
 }'