Field mapping using Spring Data Elastic Search on ES 6.8

Hi,
I use Spring Boot 2.1 ElasticSearch to communicate with Elastic Search 6.8. Earlier I used Spring Boot 2.0 on ES 6.4. Recently I upgraded both Spring Boot to 2.1 and ES to 6.8.

Here is the code snippet of my Java class.

@Document(indexName = "employerdata", type = "employer")
public class Employer {
@Id
private Long beSeq;
private Integer version;
@MultiField(mainField = @Field(type = FieldType.Text, fielddata = true), otherFields = {
@InnerField(suffix = "verbatim", type = FieldType.Keyword, store = true, fielddata = true) })
private String beName;
private String beTradeName;
..........
............

}

Previously, the mapping used to look like this:
{
"employerdata": {
"mappings": {
"employer": {
"properties": {
..........
...........

"beName": {
"type": "text",
"fields": {
"verbatim": {
"type": "keyword"
}
},
"fielddata": true
},
....
....}

Now, I see a change in the way "beName" is being mapped.

"beName" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},

I do not see "verbatim" anymore in the new mapping. Because of the change in mapping, quite a few queries keep failing. My question is what could be the reason of slight change in the mapping? Secondly, is there any way to create a custom mapping and tell Spring Boot ElasticSearch not to create mapping but use the one provided? If so, how could I do that?
Thanks in adavnce.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.