elasticsearch注解实现fields

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wangh92/article/details/84847823

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;

猜你喜欢

转载自blog.csdn.net/wangh92/article/details/84847823
今日推荐