elasticsearch注解实现fields

mapping效果:

"label": {
            "type": "keyword",
            "fields": {
              "IKS": {
                "type": "text",
                "analyzer": "ikIndexAnalyzer"
              }
            }
          }
@Column(name = "标签")
    @MultiField(
            mainField = @Field(type = FieldType.Keyword),
            otherFields = {
                    @InnerField(suffix = "IKS", type = FieldType.Text, analyzer = "ikIndexAnalyzer")
            }
    )
    protected String label;
posted @ 2018-12-06 10:21  qwer78  阅读(83)  评论(0)    收藏  举报