Browse Source

更新 mapping

wcc 2 years ago
parent
commit
53f74d059c
4 changed files with 108 additions and 5 deletions
  1. 94 0
      mapping/biddingall2.txt
  2. 7 1
      mapping/biddingmapping2.txt
  3. 5 2
      mapping/buyer2.txt
  4. 2 2
      mapping/winner2.txt

+ 94 - 0
mapping/biddingall2.txt

@@ -0,0 +1,94 @@
+curl -H 'Content-Type: application/json' -XPUT http://127.0.0.1:9201/biddingall_v1 -d '{
+  "settings": {
+    "index": {
+      "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": "1",
+      "number_of_replicas": "0"
+    }
+  },
+  "mappings": {  
+      "dynamic":false,
+      "properties": {
+        "projectname": {
+          "type": "keyword",
+          "fields": {
+            "pname": {
+              "type": "keyword"
+            }
+          }
+        },
+        "id": {
+          "type": "keyword"
+        },
+        "title": {
+          "type": "keyword",
+          "fields": {
+            "mtitle": {
+              "type": "keyword"
+            }
+          }
+        },
+        "site": {
+          "type": "keyword"
+        },
+        "href": {
+          "type": "keyword"
+        },
+        "publishtime": {
+          "type": "long"
+        },
+       "comeintime": {
+          "type": "long"
+        },
+        "spidercode": {
+          "type": "keyword"
+        },
+        "extracttype": {
+          "type": "long"
+        }
+      }
+    }
+}'

+ 7 - 1
mapping/biddingmapping2.txt

@@ -45,7 +45,7 @@ curl -H 'Content-Type: application/json' -u es_all:TopJkO2E_d1x -XPUT http://127
           }
         }
       },
-      "number_of_shards": "12",
+      "number_of_shards": "24",
       "number_of_replicas": "1"
     }
   },
@@ -181,6 +181,12 @@ curl -H 'Content-Type: application/json' -u es_all:TopJkO2E_d1x -XPUT http://127
             }
           }
         },
+       "s_sha": {
+        "type": "keyword"
+        },
+        "pici": {
+        "type": "long"
+        },
         "id": {
           "type": "keyword"
         },

+ 5 - 2
mapping/buyer2.txt

@@ -1,4 +1,4 @@
-curl -H 'Content-Type: application/json' -XPUT http://192.168.3.149:9200/buyer_v2 -d  '{
+curl -H 'Content-Type: application/json' -u es_all:TopJkO2E_d1x -XPUT http://127.0.0.1:19805/buyer_v1 -d  '{
   "settings": {
     "index": {
       "analysis": {
@@ -15,7 +15,7 @@ curl -H 'Content-Type: application/json' -XPUT http://192.168.3.149:9200/buyer_v
           }
         }
       },
-      "number_of_shards": "2",
+      "number_of_shards": "12",
       "number_of_replicas": "0"
     }
   },
@@ -35,6 +35,9 @@ curl -H 'Content-Type: application/json' -XPUT http://192.168.3.149:9200/buyer_v
         "buyerclass": {
           "type": "keyword"
         },
+        "id": {
+          "type": "keyword"
+        },
         "fixedphone": {
           "type": "keyword"
         },

+ 2 - 2
mapping/winner2.txt

@@ -1,4 +1,4 @@
-curl  -H 'Content-Type: application/json'  -XPUT http://192.168.3.149:9200/winner_v2 -d '{
+curl  -H 'Content-Type: application/json' -u es_all:TopJkO2E_d1x  -XPUT http://127.0.0.1:19805/winner_v1 -d '{
 "settings": {
   "index": {
     "analysis": {
@@ -15,7 +15,7 @@ curl  -H 'Content-Type: application/json'  -XPUT http://192.168.3.149:9200/winne
         }
       }
     },
-    "number_of_shards": "2",
+    "number_of_shards": "12",
     "number_of_replicas": "0"
   }
 },