66 */
77package org .elasticsearch .xpack .deprecation ;
88
9+ import org .elasticsearch .Version ;
910import org .elasticsearch .cluster .ClusterState ;
1011import org .elasticsearch .cluster .metadata .IndexMetadata ;
1112import org .elasticsearch .cluster .metadata .IndexNameExpressionResolver ;
@@ -100,14 +101,14 @@ private DeprecationIssue oldIndicesCheck(
100101 if (transforms .isEmpty () == false ) {
101102 return new DeprecationIssue (
102103 DeprecationIssue .Level .CRITICAL ,
103- "One or more Transforms write to this index with a compatibility version < 9.0" ,
104- "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html"
105- + "#breaking_90_transform_destination_index" ,
104+ "One or more Transforms write to this index with a compatibility version < " + Version .CURRENT .major + ".0" ,
105+ "https://ela.st/es-deprecation-9-transform-destination-index" ,
106106 Strings .format (
107- "This index was created in version [%s] and requires action before upgrading to 9 .0. The following transforms are "
107+ "This index was created in version [%s] and requires action before upgrading to %d .0. The following transforms are "
108108 + "configured to write to this index: [%s]. Refer to the migration guide to learn more about how to prepare "
109109 + "transforms destination indices for your upgrade." ,
110110 currentCompatibilityVersion .toReleaseVersion (),
111+ Version .CURRENT .major ,
111112 String .join (", " , transforms )
112113 ),
113114 false ,
@@ -116,8 +117,8 @@ private DeprecationIssue oldIndicesCheck(
116117 } else {
117118 return new DeprecationIssue (
118119 DeprecationIssue .Level .CRITICAL ,
119- "Old index with a compatibility version < 9 .0" ,
120- "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html " ,
120+ "Old index with a compatibility version < " + Version . CURRENT . major + " .0" ,
121+ "https://ela.st/es-deprecation-9-index-version " ,
121122 "This index has version: " + currentCompatibilityVersion .toReleaseVersion (),
122123 false ,
123124 Map .of ("reindex_required" , true )
@@ -143,14 +144,14 @@ private DeprecationIssue ignoredOldIndicesCheck(
143144 if (transforms .isEmpty () == false ) {
144145 return new DeprecationIssue (
145146 DeprecationIssue .Level .WARNING ,
146- "One or more Transforms write to this old index with a compatibility version < 9.0" ,
147- "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html"
148- + "#breaking_90_transform_destination_index" ,
147+ "One or more Transforms write to this old index with a compatibility version < " + Version .CURRENT .major + ".0" ,
148+ "https://ela.st/es-deprecation-9-transform-destination-index" ,
149149 Strings .format (
150- "This index was created in version [%s] and will be supported as a read-only index in 9 .0. The following "
150+ "This index was created in version [%s] and will be supported as a read-only index in %d .0. The following "
151151 + "transforms are no longer able to write to this index: [%s]. Refer to the migration guide to learn more "
152152 + "about how to handle your transforms destination indices." ,
153153 currentCompatibilityVersion .toReleaseVersion (),
154+ Version .CURRENT .major ,
154155 String .join (", " , transforms )
155156 ),
156157 false ,
@@ -159,11 +160,13 @@ private DeprecationIssue ignoredOldIndicesCheck(
159160 } else {
160161 return new DeprecationIssue (
161162 DeprecationIssue .Level .WARNING ,
162- "Old index with a compatibility version < 9 .0 has been ignored" ,
163- "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html " ,
163+ "Old index with a compatibility version < " + Version . CURRENT . major + " .0 has been ignored" ,
164+ "https://ela.st/es-deprecation-9-index-version " ,
164165 "This read-only index has version: "
165166 + currentCompatibilityVersion .toReleaseVersion ()
166- + " and will be supported as read-only in 9.0" ,
167+ + " and will be supported as read-only in "
168+ + Version .CURRENT .major
169+ + ".0" ,
167170 false ,
168171 Map .of ("reindex_required" , true )
169172 );
@@ -196,7 +199,7 @@ private DeprecationIssue translogRetentionSettingCheck(
196199 return new DeprecationIssue (
197200 DeprecationIssue .Level .WARNING ,
198201 "translog retention settings are ignored" ,
199- "https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules- translog.html " ,
202+ "https://ela.st/es-deprecation-7- translog-retention " ,
200203 "translog retention settings [index.translog.retention.size] and [index.translog.retention.age] are ignored "
201204 + "because translog is no longer used in peer recoveries with soft-deletes enabled (default in 7.0 or later)" ,
202205 false ,
@@ -214,8 +217,7 @@ private DeprecationIssue checkIndexDataPath(IndexMetadata indexMetadata, Cluster
214217 "setting [%s] is deprecated and will be removed in a future version" ,
215218 IndexMetadata .INDEX_DATA_PATH_SETTING .getKey ()
216219 );
217- final String url = "https://www.elastic.co/guide/en/elasticsearch/reference/7.13/"
218- + "breaking-changes-7.13.html#deprecate-shared-data-path-setting" ;
220+ final String url = "https://ela.st/es-deprecation-7-index-data-path" ;
219221 final String details = "Found index data path configured. Discontinue use of this setting." ;
220222 return new DeprecationIssue (DeprecationIssue .Level .WARNING , message , url , details , false , null );
221223 }
@@ -232,7 +234,7 @@ private DeprecationIssue storeTypeSettingCheck(
232234 return new DeprecationIssue (
233235 DeprecationIssue .Level .WARNING ,
234236 "[simplefs] is deprecated and will be removed in future versions" ,
235- "https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-store.html " ,
237+ "https://ela.st/es-deprecation-7-simplefs " ,
236238 "[simplefs] is deprecated and will be removed in 8.0. Use [niofs] or other file systems instead. "
237239 + "Elasticsearch 7.15 or later uses [niofs] for the [simplefs] store type "
238240 + "as it offers superior or equivalent performance to [simplefs]." ,
0 commit comments