Skip to content

Commit 7ed7655

Browse files
committed
Adjust details in the SourceFieldMapper deprecation warning
1 parent 8d4f034 commit 7ed7655

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

server/src/main/java/org/elasticsearch/index/mapper/SourceFieldMapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ public class SourceFieldMapper extends MetadataFieldMapper {
5858

5959
public static final String LOSSY_PARAMETERS_ALLOWED_SETTING_NAME = "index.lossy.source-mapping-parameters";
6060

61-
public static final String DEPRECATION_WARNING = "Configuring source mode in mappings is deprecated and will be removed "
61+
public static final String DEPRECATION_WARNING = "Configuring source mode in mappings is deprecated.";
62+
63+
public static final String DEPRECATION_DETAILS = "Configuring source mode in mappings is deprecated and will be removed "
6264
+ "in future versions. Use [index.mapping.source.mode] index setting instead.";
6365

6466
/** The source mode */

x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/TemplateDeprecationChecker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private DeprecationIssue checkSourceModeInComponentTemplates(ComponentTemplate t
124124
DeprecationIssue.Level.CRITICAL,
125125
SourceFieldMapper.DEPRECATION_WARNING,
126126
"https://github.com/elastic/elasticsearch/pull/117172",
127-
null,
127+
SourceFieldMapper.DEPRECATION_DETAILS,
128128
false,
129129
null
130130
);

x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/TemplateDeprecationCheckerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void testCheckSourceModeInComponentTemplates() throws IOException {
5353
DeprecationIssue.Level.CRITICAL,
5454
SourceFieldMapper.DEPRECATION_WARNING,
5555
"https://github.com/elastic/elasticsearch/pull/117172",
56-
null,
56+
SourceFieldMapper.DEPRECATION_DETAILS,
5757
false,
5858
null
5959
);

0 commit comments

Comments
 (0)