wukai 1 жил өмнө
parent
commit
73acf5abe1

+ 7 - 2
doc-biz/src/main/java/com/doc/biz/domain/EsDocInfo.java

@@ -22,7 +22,12 @@ public class EsDocInfo {
     @Id
     private Long id;
 
-    @Field(type = FieldType.Text, analyzer = "ik_max_word")
+    /**
+     * analyzer分词模式有2种
+     * 1.细粒度模式 ik_max_word
+     * 2.智能模式 ik_smart
+     */
+    @Field(type = FieldType.Text, analyzer = "ik_smart")
     private String content;
 
     private DocInfo docInfo;
@@ -31,4 +36,4 @@ public class EsDocInfo {
         this.id = id;
         this.content = content;
     }
-}
+}