1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| package com.tensquare.search.pojo;
import org.springframework.data.annotation.Id; import org.springframework.data.elasticsearch.annotations.Document; import org.springframework.data.elasticsearch.annotations.Field;
import java.io.Serializable;
@Document(indexName="tensquare",type="article") public class Article implements Serializable { @Id private String id; @Field(index= true,analyzer="ik_max_word",searchAnalyzer="ik_max_word") private String title; @Field(index= true,analyzer="ik_max_word",searchAnalyzer="ik_max_word") private String content; private String state; }
|