diff --git a/src/main/java/com/guwan/backend/es/document/VideoDocument.java b/src/main/java/com/guwan/backend/es/document/VideoDocument.java index 36982ec..d8a7857 100644 --- a/src/main/java/com/guwan/backend/es/document/VideoDocument.java +++ b/src/main/java/com/guwan/backend/es/document/VideoDocument.java @@ -4,6 +4,7 @@ import cn.easyes.annotation.IndexField; import cn.easyes.annotation.IndexId; import cn.easyes.annotation.IndexName; import cn.easyes.annotation.Score; +import cn.easyes.annotation.rely.FieldType; import lombok.Data; import java.time.LocalDateTime; @@ -14,43 +15,43 @@ public class VideoDocument { @IndexId private Long id; - @IndexField(fieldType = "text", analyzer = "ik_max_word", searchAnalyzer = "ik_smart") + @IndexField(fieldType = FieldType.TEXT, analyzer = "ik_max_word", searchAnalyzer = "ik_smart") private String title; - @IndexField(fieldType = "text", analyzer = "ik_max_word", searchAnalyzer = "ik_smart") + @IndexField(fieldType = FieldType.TEXT, analyzer = "ik_max_word", searchAnalyzer = "ik_smart") private String description; - @IndexField(fieldType = "keyword") + @IndexField(fieldType = FieldType.KEYWORD) private String url; - @IndexField(fieldType = "keyword") + @IndexField(fieldType = FieldType.KEYWORD) private String coverUrl; - @IndexField(fieldType = "long") + @IndexField(fieldType = FieldType.LONG) private Long duration; - @IndexField(fieldType = "long") + @IndexField(fieldType = FieldType.LONG) private Long size; - @IndexField(fieldType = "keyword") + @IndexField(fieldType = FieldType.KEYWORD) private String status; - @IndexField(fieldType = "long") + @IndexField(fieldType = FieldType.LONG) private Long userId; - @IndexField(fieldType = "keyword") + @IndexField(fieldType = FieldType.KEYWORD) private String username; - @IndexField(fieldType = "date") + @IndexField(fieldType = FieldType.DATE) private LocalDateTime createdTime; - @IndexField(fieldType = "integer") + @IndexField(fieldType = FieldType.INTEGER) private Integer viewCount; - @IndexField(fieldType = "integer") + @IndexField(fieldType = FieldType.INTEGER) private Integer likeCount; - @IndexField(fieldType = "keyword") + @IndexField(fieldType = FieldType.KEYWORD) private String tags; @Score