-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Only issue a deprecation warning if include_type_name is not set. #38825
Only issue a deprecation warning if include_type_name is not set. #38825
Conversation
We expect many users to have a custom document type in 6.x, for example they might have used `doc` when creating indices. In this case, users cannot easily switch over to typeless index creations in 6.7 using `include_type_name=false`, because the rest of their document CRUD calls will refer to the custom type. Instead, we are recommending that users take the following steps: set `include_type_name=true` in 6.7 for all relevant calls, upgrade to 7.0, then switch over completely to the typeless APIs and stop using `include_type_name`. This means that it will be very common to set `include_type_name=true` in 6.7, so it is misleading to emit a deprecation warning to tell the user to switch to using `include_type_name=false`. This PR switches to emitting a deprecation warning only if `include_type_name` is not set at all. The warning serves as an important note to users that the request and response format of these APIs will change in a breaking way in 7.0.
Pinging @elastic/es-search |
Follow-up to elastic#38825, where we made a tweak to the deprecation behavior.
"mapping requests will change in 7.0. Please start using the include_type_name parameter set to false " + | ||
"to move to the new, typeless response format that will become the default."; | ||
static final String TYPES_DEPRECATION_MESSAGE = "[types removal] The parameter include_type_name " + | ||
"should be explicitly specified in get index requests to prepare for 7.0. In 7.0 include_type_name " + |
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.
get index requests
@jtibshirani should it be "get field mapping requests"?
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.
Thanks @mayya-sharipova, will fix. I somehow make this mistake every time...
Follow-up to #38825, where we made a tweak to the deprecation behavior.
Follow-up to #38825, where we made a tweak to the deprecation behavior.
Follow-up to #38825, where we made a tweak to the deprecation behavior.
Follow-up to #38825, where we made a tweak to the deprecation behavior.
Follow-up to #38825, where we made a tweak to the deprecation behavior.
Follow-up to #38825, where we made a tweak to the deprecation behavior.
We expect many users to have a custom document type in 6.x, for example they
might have used
doc
when creating indices. In this case, users cannot easilyswitch over to typeless index creations in 6.7 using
include_type_name=false
,because the rest of their document CRUD calls will refer to the custom type.
Instead, we are recommending that users take the following steps: set
include_type_name=true
in 6.7 for all relevant calls, upgrade to 7.0, thenswitch over completely to the typeless APIs and stop using
include_type_name
.This means that it will be very common to set
include_type_name=true
in 6.7,so it is misleading to emit a deprecation warning to tell the user to switch to
using
include_type_name=false
. This PR switches to emitting a deprecationwarning only if
include_type_name
is not set at all. The warning serves as animportant note to users that the request and response format of these APIs will
change in a breaking way in 7.0.
Relates to #35190.