-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Don't repeat type name in update mapping #4483
Comments
first, I don't fully agree with this issue, I don't think putting the type as top level is repetitive. It actually maps into what we are going to return in the get mapping API. second, if we are going to do it, we have to make it backward compatible. |
@kimchy this change is entirely backwards compatible. Either specifying the type (old method), or not specifying the type are supported. See http://p.writequit.org/org/4483-dont-repeat-type.html for examples. |
@kimchy I see your comment about the additional parameters at the top level, I'll make sure this is entirely backwards compatible with those settings, thanks for pointing those out! |
Put mapping now supports either of these formats: POST foo/doc/_mapping { "doc": { "_routing": {"required": true}, "properties": { "body": {"type": "string"} } } } or POST foo/doc/_mapping { "_routing": {"required": true}, "properties": { "body": {"type": "string"} } } Closes elastic#4483
Put mapping now supports either of these formats: POST foo/doc/_mapping { "doc": { "_routing": {"required": true}, "properties": { "body": {"type": "string"} } } } or POST foo/doc/_mapping { "_routing": {"required": true}, "properties": { "body": {"type": "string"} } } Closes elastic#4483
When a mapping is declared and the type is known from the uri then the type can be skipped in the body (see elastic#4483). However, there was no check if the given keys actually make a valid mapping. closes elastic#5864
When a mapping is declared and the type is known from the uri then the type can be skipped in the body (see elastic#4483). However, there was no check if the given keys actually make a valid mapping. closes elastic#5864
Currently the
update_mapping
API requires the type name to be repeated in the body, eg:This repetition is confusing and unnecessary. Instead should be OK to do:
Bonus points for making the change in a backwards compatible way :)
The text was updated successfully, but these errors were encountered: