diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCreateIndexAction.java b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCreateIndexAction.java index 24046dbbed6c6..064137edb4ceb 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCreateIndexAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCreateIndexAction.java @@ -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); diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetFieldMappingAction.java b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetFieldMappingAction.java index 86292cc81aee9..02d9010d0490e 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetFieldMappingAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetFieldMappingAction.java @@ -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); diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetIndicesAction.java b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetIndicesAction.java index 33263be937459..a2a539e8a8d6c 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetIndicesAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetIndicesAction.java @@ -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 allowedResponseParameters = Collections .unmodifiableSet(Stream.concat(Collections.singleton(INCLUDE_TYPE_NAME_PARAMETER).stream(), Settings.FORMAT_PARAMS.stream()) diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetMappingAction.java b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetMappingAction.java index cd7d82c9e465c..e8b4603bd4fb0 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetMappingAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetMappingAction.java @@ -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); diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutMappingAction.java b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutMappingAction.java index 5c5565916098f..f5c171fe70765 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutMappingAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutMappingAction.java @@ -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);