Skip to content

Commit

Permalink
Remove support for string in unmapped_type. (#45675)
Browse files Browse the repository at this point in the history
This deprecated option was added in 0d8e399 and can now be removed.
  • Loading branch information
jtibshirani authored Aug 20, 2019
1 parent b97d87a commit 8930f7f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 8930f7f

Please sign in to comment.