diff --git a/server/src/main/java/org/elasticsearch/index/mapper/MapperService.java b/server/src/main/java/org/elasticsearch/index/mapper/MapperService.java index 997a03d731c53..34b02825bf4ef 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/MapperService.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/MapperService.java @@ -770,10 +770,6 @@ public ObjectMapper getObjectMapper(String name) { * Given a type (eg. long, string, ...), return an anonymous field mapper that can be used for search operations. */ public MappedFieldType unmappedFieldType(String type) { - if (type.equals("string")) { - deprecationLogger.deprecated("[unmapped_type:string] should be replaced with [unmapped_type:keyword]"); - type = "keyword"; - } MappedFieldType fieldType = unmappedFieldTypes.get(type); if (fieldType == null) { final Mapper.TypeParser.ParserContext parserContext = documentMapperParser().parserContext(); diff --git a/server/src/test/java/org/elasticsearch/index/mapper/MapperServiceTests.java b/server/src/test/java/org/elasticsearch/index/mapper/MapperServiceTests.java index 3e02e2a6be059..c67c2563fb306 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/MapperServiceTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/MapperServiceTests.java @@ -185,9 +185,6 @@ public void testUnmappedFieldType() { MapperService mapperService = createIndex("index").mapperService(); assertThat(mapperService.unmappedFieldType("keyword"), instanceOf(KeywordFieldType.class)); assertThat(mapperService.unmappedFieldType("long"), instanceOf(NumberFieldType.class)); - // back compat - assertThat(mapperService.unmappedFieldType("string"), instanceOf(KeywordFieldType.class)); - assertWarnings("[unmapped_type:string] should be replaced with [unmapped_type:keyword]"); } public void testPartitionedConstraints() {