feat(es): es

es
This commit is contained in:
ovo 2024-12-08 19:27:48 +08:00
parent 12cfe0a184
commit 43c7bf1810
1 changed files with 14 additions and 13 deletions

View File

@ -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