-
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
Deprecate the update_all_types
option.
#28284
Conversation
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.
@jpountz I left a question, don't know if you thought about that option and rejected it for some reason or it has other disadvantages, but would like to hear your thoughts.
@@ -49,6 +54,9 @@ public RestChannelConsumer prepareRequest(final RestRequest request, final NodeC | |||
if (request.hasContent()) { | |||
createIndexRequest.source(request.content(), request.getXContentType()); | |||
} | |||
if (request.hasParam("update_all_types")) { | |||
DEPRECATION_LOGGER.deprecated("[update_all_types] is deprecated since indices may not have more than one type anymore"); |
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.
Maybe it would make sense to put this in createIndexRequest#updateAllTypes, so we also log warnings for Java API users, wdyt?
@@ -70,6 +75,9 @@ public RestChannelConsumer prepareRequest(final RestRequest request, final NodeC | |||
PutMappingRequest putMappingRequest = putMappingRequest(Strings.splitStringByCommaToArray(request.param("index"))); | |||
putMappingRequest.type(request.param("type")); | |||
putMappingRequest.source(request.requiredContent(), request.getXContentType()); | |||
if (request.hasParam("update_all_types")) { | |||
DEPRECATION_LOGGER.deprecated("[update_all_types] is deprecated since indices may not have more than one type anymore"); |
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.
Same here but for putMappingRequest#updateAllTypes.
Hmm I had never thought of using the deprecation logger for client-side warnings, I'm not sure what I think about it. However I'd be happy to mark the Java methods as |
@jpountz sorry, of course I forgot about the logging infra not being available there. Deprecating the methods makes sense to me though. |
This option makes no sense on indices that have only one type, which is enforced since 6.0.
105707a
to
6520288
Compare
* es/6.x: [Docs] Fix explanation for `from` and `size` example (#28320) Adapt bwc version after backport #28358 Always return the after_key in composite aggregation response (#28358) Adds a note in the `terms` aggregation docs regarding pagination (#28360) Update packaging tests to work with meta plugins (#28336) Remove Painless Type from MethodWriter in favor of Java Class. (#28346) [Doc] Fixs typo in reverse-nested-aggregation.asciidoc (#28348) [Docs] Fixed Indices information breaking changes (#27914) Reindex: Shore up rethrottle test isHeldByCurrentThread should return primitive bool [Docs] Clarify `html` encoder in highlighting.asciidoc (#27766) Only assert single commit iff index created on 6.2 Deprecate the `update_all_types` option. (#28284) Fix GeoDistance query example Settings: Introduce settings updater for a list of settings (#28338) [Docs] Fix asciidoc style in composite agg docs Adapt bwc version after backport #28310 Adds the ability to specify a format on composite date_histogram source (#28310)
This option makes no sense on indices that have only one type, which is
enforced since 6.0.