Skip to content

Commit 8930f7f

Browse files
authored
Remove support for string in unmapped_type. (#45675)
This deprecated option was added in 0d8e399 and can now be removed.
1 parent b97d87a commit 8930f7f

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

server/src/main/java/org/elasticsearch/index/mapper/MapperService.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -770,10 +770,6 @@ public ObjectMapper getObjectMapper(String name) {
770770
* Given a type (eg. long, string, ...), return an anonymous field mapper that can be used for search operations.
771771
*/
772772
public MappedFieldType unmappedFieldType(String type) {
773-
if (type.equals("string")) {
774-
deprecationLogger.deprecated("[unmapped_type:string] should be replaced with [unmapped_type:keyword]");
775-
type = "keyword";
776-
}
777773
MappedFieldType fieldType = unmappedFieldTypes.get(type);
778774
if (fieldType == null) {
779775
final Mapper.TypeParser.ParserContext parserContext = documentMapperParser().parserContext();

server/src/test/java/org/elasticsearch/index/mapper/MapperServiceTests.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,6 @@ public void testUnmappedFieldType() {
185185
MapperService mapperService = createIndex("index").mapperService();
186186
assertThat(mapperService.unmappedFieldType("keyword"), instanceOf(KeywordFieldType.class));
187187
assertThat(mapperService.unmappedFieldType("long"), instanceOf(NumberFieldType.class));
188-
// back compat
189-
assertThat(mapperService.unmappedFieldType("string"), instanceOf(KeywordFieldType.class));
190-
assertWarnings("[unmapped_type:string] should be replaced with [unmapped_type:keyword]");
191188
}
192189

193190
public void testPartitionedConstraints() {

0 commit comments

Comments
 (0)