lives
lives

Reputation: 1185

Spring data elastic search 3 does not support FieldType.String

In elastic search 2 , I configured string property like below

@Field(type = FieldType.String, analyzer = "synonym_analyzer")
    private String transformedTitle ;

After upgrading to elastic search 5 and spring data elastic search 3.0.0.RC2 , I observe that FieldType.String is no longer available .

Should I use FiledType.Auto ?

Upvotes: 0

Views: 741

Answers (2)

Miracle
Miracle

Reputation: 26

The string field datatype has been replaced by the text field for full text analyzed content, and the keyword field for not-analyzed exact string values, during the 5.x series.

You should be useing FieldType.text or FieldType.keyword

Upvotes: 1

Val
Val

Reputation: 217254

As of ES 5, you should be using FieldType.text:

@Field(type = FieldType.text, analyzer = "synonym_analyzer")
private String transformedTitle ;

Upvotes: 1

Related Questions