-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Support 'include_type_name' in RestGetIndicesAction #37267
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
Conversation
This change adds support for the 'include_type_name' parameter for the indices.get API. This parameter, which defaults to `false` starting in 7.0, changes the response to not include the indices type names any longer. If the parameter is set in the request, we additionally emit a deprecation warning since using the parameter should be only temporarily necessary while adapting to the new response format and we will remove it with the next major version.
Help Eclipse compiler infering correct type argumentes by giving some explicit casting hints.
|
Pinging @elastic/es-search |
jtibshirani
left a comment
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.
This is looking good to me, I just left some small comments.
rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/10_basic.yml
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetIndicesAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetIndicesAction.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/rest/action/admin/indices/RestGetIndicesActionTests.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/AutoFollowStats.java
Show resolved
Hide resolved
|
One other comment I had forgotten -- should we start explicitly setting |
This should already happen by using the default value |
server/src/main/java/org/elasticsearch/action/admin/indices/get/GetIndexResponse.java
Outdated
Show resolved
Hide resolved
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get.json
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetIndicesAction.java
Outdated
Show resolved
Hide resolved
...c/test/java/org/elasticsearch/action/admin/indices/mapping/get/GetMappingsResponseTests.java
Show resolved
Hide resolved
We would like the 6.7 HLRC to be able to understand responses from 7.0 nodes. Since |
...nt/rest-high-level/src/test/java/org/elasticsearch/client/IndicesRequestConvertersTests.java
Show resolved
Hide resolved
jtibshirani
left a comment
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.
Looks good to me, pending @markharwood's last small comments.
|
After this gets merged, would you mind kicking off a new 6.x snapshot? |
|
@elasticmachine run the gradle build tests 2 |
|
LGTM |
|
@jtibshirani @markharwood thanks for the reviews. I'll merge and follow up with a small PR against master enabling mixed-cluster rest tests between 7.0 and 6.x now that the parameter is supported in both versions. |
This is the backport of #37149, introducing the "include_type_name" parameter
to the indices.get API. The difference is that the parameter defaults to "true" on 6.x,
leading to the old known response format. A deprecation is issues when the parameter
isn't used or is set to "true" (the default) to make users aware of the changed default
behaviour starting in 7.0 and moving them towards the new typeless response format.