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;

你可能感兴趣的:(elasticsearch)