-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove include_type_name
parameter from REST layer
#48632
Remove include_type_name
parameter from REST layer
#48632
Conversation
Pinging @elastic/es-search (:Search/Mapping) |
Pinging @elastic/es-core-features (:Core/Features/Indices APIs) |
Map<String, Object> mappings = parser.map(); | ||
if (MapperService.isMappingSourceTyped(MapperService.SINGLE_MAPPING_NAME, mappings)) { | ||
throw new IllegalArgumentException("The mapping definition cannot be nested under a type " + | ||
"[" + MapperService.SINGLE_MAPPING_NAME + "] unless include_type_name is set to true."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we don't have include_type_name
parameter anymore, I think the error message should just say: "The mapping definition cannot be nested under a type."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@romseygeek, this PR LGTM.
I have just a small comment about the error message, which can also be addressed in next PRs of type removals.
if (includeTypeName | ||
|| source.containsKey("mappings") == false | ||
static Map<String, Object> prepareMappings(Map<String, Object> source) { | ||
if (source.containsKey("mappings") == false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here also on the line 80, may be also worth correcting the error message to have only "The mapping definition cannot be nested under a type"
@elasticmachine update branch |
@elasticmachine update branch |
In #48632 we removed support for `include_type_name` in the REST API. This PR removes it from the API spec and documentation.
Adds an 8.0 breaking change for PR #48632.
This commit removes support for the
include_type_name
parameter from allREST actions that receive or return mapping configurations.
Relates to #41059