Skip to content
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

Improve the deprecation messages around include_type_name. #38052

Merged
merged 2 commits into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public class RestCreateIndexAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = new DeprecationLogger(
LogManager.getLogger(RestPutMappingAction.class));
public static final String TYPES_DEPRECATION_MESSAGE = "[types removal] Specifying types in create index " +
"requests is deprecated. The parameter include_type_name should be provided and set to false to be " +
"compatible with the next major version.";
"requests is deprecated. To be compatible with 7.0, the mapping definition should not be nested under " +
"the type name, and the parameter include_type_name must be provided and set to false.";

public RestCreateIndexAction(Settings settings, RestController controller) {
super(settings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public class RestGetFieldMappingAction extends BaseRestHandler {

private static final DeprecationLogger deprecationLogger = new DeprecationLogger(
LogManager.getLogger(RestGetFieldMappingAction.class));
public static final String TYPES_DEPRECATION_MESSAGE = "[types removal] Specifying types in get field mapping " +
"requests is deprecated. The parameter include_type_name should be provided and set to false to be " +
"compatible with the next major version.";
public static final String TYPES_DEPRECATION_MESSAGE = "[types removal] The response format of get field " +
"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.";

public RestGetFieldMappingAction(Settings settings, RestController controller) {
super(settings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@
*/
public class RestGetIndicesAction extends BaseRestHandler {

private static final DeprecationLogger deprecationLogger = new DeprecationLogger(LogManager.getLogger(RestGetIndicesAction.class));
static final String TYPES_DEPRECATION_MESSAGE = "[types removal] The response format of get indices requests will change in "
+ "the next major version. Please start using the `include_type_name` parameter set to `false` in the request to "
+ "move to the new, typeless response format that will be the default in 7.0.";
private static final DeprecationLogger deprecationLogger = new DeprecationLogger(
LogManager.getLogger(RestGetIndicesAction.class));
static final String TYPES_DEPRECATION_MESSAGE = "[types removal] The response format of get indices 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.";

private static final Set<String> allowedResponseParameters = Collections
.unmodifiableSet(Stream.concat(Collections.singleton(INCLUDE_TYPE_NAME_PARAMETER).stream(), Settings.FORMAT_PARAMS.stream())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
public class RestGetMappingAction extends BaseRestHandler {
private static final Logger logger = LogManager.getLogger(RestGetMappingAction.class);
private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger);
public static final String TYPES_DEPRECATION_MESSAGE = "[types removal] Using include_type_name in get" +
" mapping requests is deprecated. The parameter will be removed in the next major version.";

public static final String TYPES_DEPRECATION_MESSAGE = "[types removal] The response format of get 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.";

public RestGetMappingAction(final Settings settings, final RestController controller) {
super(settings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
public class RestPutMappingAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = new DeprecationLogger(
LogManager.getLogger(RestPutMappingAction.class));
public static final String TYPES_DEPRECATION_MESSAGE = "[types removal] Specifying types in put mapping " +
"requests is deprecated. The parameter include_type_name should be provided and set to false to be " +
"compatible with the next major version.";
public static final String TYPES_DEPRECATION_MESSAGE = "[types removal] Specifying types in create index " +
"requests is deprecated. To be compatible with 7.0, the mapping definition should not be nested under " +
"the type name, and the parameter include_type_name must be provided and set to false.";

public RestPutMappingAction(Settings settings, RestController controller) {
super(settings);
Expand Down