Răsfoiți Sursa

添加 detail mapping

wcc 5 luni în urmă
părinte
comite
abe2ed68c1
4 a modificat fișierele cu 75 adăugiri și 10 ștergeri
  1. 69 0
      mapping/detailmapping.txt
  2. 2 2
      mapping/projectset2.txt
  3. 2 2
      mapping/projectset2_detail.txt
  4. 2 6
      mapping/qyxy2.txt

+ 69 - 0
mapping/detailmapping.txt

@@ -0,0 +1,69 @@
+curl -H 'Content-Type: application/json'  -u jybid:Top2023_JEB01i@31 -XPUT http://127.0.0.1:19908/detail_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": "9",
+      "number_of_replicas": "0",
+      "max_result_window": "20000"
+    }
+  },
+  "mappings": {
+    "dynamic":false,
+      "properties": {
+        "detail": {
+          "analyzer": "my_ngram",
+          "type": "text"
+        },
+       "contenthtml": {
+          "analyzer": "my_ngram",
+          "type": "text"
+        },
+        "id": {
+          "type": "keyword"
+        }
+    }
+  }
+}'

+ 2 - 2
mapping/projectset2.txt

@@ -1,4 +1,4 @@
-curl -H 'Content-Type: application/json' -u jybid:Top2023_JEB01i@31 -XPUT http://127.0.0.1:19908/projectset_v1 -d '{
+curl -H 'Content-Type: application/json'  -XPUT http://172.20.45.129:9206/projectset_v1 -d '{
   "settings": {
     "index": {
       "analysis": {
@@ -43,7 +43,7 @@ curl -H 'Content-Type: application/json' -u jybid:Top2023_JEB01i@31 -XPUT http:/
           }
         }
       },
-      "number_of_shards": "9",
+      "number_of_shards": "1",
       "number_of_replicas": "0"
     }
   },

+ 2 - 2
mapping/projectset2_detail.txt

@@ -1,4 +1,4 @@
-curl -H 'Content-Type: application/json'  -XPUT http://192.168.3.149:9201/projectdetail_v1 -d '{
+curl -H 'Content-Type: application/json' -u jybid:Top2023_JEB01i@31 -XPUT http://127.0.0.1:19908/projectdetail_v2 -d '{
   "settings": {
     "index": {
       "analysis": {
@@ -43,7 +43,7 @@ curl -H 'Content-Type: application/json'  -XPUT http://192.168.3.149:9201/projec
           }
         }
       },
-      "number_of_shards": "2",
+      "number_of_shards": "9",
       "number_of_replicas": "0"
     }
   },

+ 2 - 6
mapping/qyxy2.txt

@@ -1,4 +1,4 @@
-curl -H 'Content-Type: application/json'   -XPUT http://192.168.3.149:9201/qyxy_v2 -d '{
+curl -H 'Content-Type: application/json'   -XPUT http://172.20.45.129:9206/qyxy_v1 -d '{
 "settings": {
   "index": {
     "analysis": {
@@ -55,7 +55,7 @@ curl -H 'Content-Type: application/json'   -XPUT http://192.168.3.149:9201/qyxy_
         }
       }
     },
-    "number_of_shards": "2",
+    "number_of_shards": "1",
     "number_of_replicas": "0"
   }
 },
@@ -68,10 +68,6 @@ curl -H 'Content-Type: application/json'   -XPUT http://192.168.3.149:9201/qyxy_
         "fields": {
           "ent_name": {
             "type": "keyword"
-          },
-          "ent_ikname": {
-            "analyzer": "ik_smart",
-            "type": "text"
           }
         }
       },