# Field mapping using Spring Data Elastic Search on ES 6.8

**URL:** <https://discuss.elastic.co/t/field-mapping-using-spring-data-elastic-search-on-es-6-8/192014>\
**Category:** Elasticsearch\
**Created:** [July 24, 2019, 11:39am UTC](https://discuss.elastic.co/t/field-mapping-using-spring-data-elastic-search-on-es-6-8/192014 "2019-07-24T11:39:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinitp](https://avatars.discourse-cdn.com/v4/letter/v/46a35a/32.png) [@vinitp](https://discuss.elastic.co/u/vinitp)\
**Post date:** [July 24, 2019, 11:39am UTC](https://discuss.elastic.co/t/field-mapping-using-spring-data-elastic-search-on-es-6-8/192014/1 "2019-07-24T11:39:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 21, 2019, 11:39am UTC](https://discuss.elastic.co/t/field-mapping-using-spring-data-elastic-search-on-es-6-8/192014/2 "2019-08-21T11:39:22Z")

</div>

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