-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Update RestPutMappingAction for deprecation warning for inculde_types #58675
Copy link
Copy link
Closed
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>bugTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearch
Description
We receive the deprecation warning "Specifying types in put mapping requests is deprecated. To be compatible with 7.0, the mapping definition should not be nested under the type name, and the parameter include_type_name must be provided and set to false.".
There is a corresponding issue. But in one file it is still the same RestPutMappingAction.java:
if (includeTypeName) {
deprecationLogger.deprecatedAndMaybeLog("put_mapping_with_types", TYPES_DEPRECATION_MESSAGE);
} else if (type != null || isMappingSourceTyped(MapperService.SINGLE_MAPPING_NAME, sourceAsMap)) {
throw new IllegalArgumentException("Types cannot be provided in put mapping requests, unless " +
"the include_type_name parameter is set to true.");
}
and it is should be changed to
if (request.hasParam(INCLUDE_TYPE_NAME_PARAMETER) == false) {
deprecationLogger.deprecatedAndMaybeLog("put_mapping_with_types", TYPES_DEPRECATION_MESSAGE);
}
Elasticsearch 6.8.10
Java 11
Springboot 2.2.7
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>bugTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearch
Type
Fields
Give feedbackNo fields configured for issues without a type.