Skip to content

Commit 007afb5

Browse files
committed
Troubleshoot source mode deprecation warnings
1 parent aaa5ce8 commit 007afb5

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

docs/reference/troubleshooting.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ If you're using Elastic Cloud Hosted, then you can use AutoOps to monitor your c
2525
* <<allow-all-cluster-allocation,Allow Elasticsearch to allocate the data in the system>>
2626
* <<allow-all-index-allocation,Allow Elasticsearch to allocate the index>>
2727
* <<troubleshoot-migrate-to-tiers,Indices mix index allocation filters with data tiers node roles to move through data tiers>>
28+
* <<troubleshoot-migrate-source-mode,Configuring source mode in mappings is deprecated and replaced by an index setting>>
2829
* <<increase-tier-capacity,Not enough nodes to allocate all shard replicas>>
2930
* <<increase-shard-limit,Total number of shards for an index on a single node exceeded>>
3031
* <<increase-cluster-shard-limit,Total number of shards per node has been reached>>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[[troubleshoot-migrate-source-mode]]
2+
== Configuring source mode in mappings is deprecated and replaced by an index setting
3+
4+
Index <<mapping-source-field,source>> mode was previously configured in mappings as follows:
5+
6+
[source,js]
7+
----
8+
"mappings": {
9+
"source": {
10+
"mode": "synthetic"
11+
},
12+
"foo": {
13+
"type": "keyword"
14+
},
15+
"bar": {
16+
"type": "keyword"
17+
}
18+
}
19+
----
20+
// NOTCONSOLE
21+
22+
Starting with version 8.18, this method for configuring the source mode is considered
23+
deprecated and replaced by index setting `index.mapping.source.mode` that accepts the
24+
same values: `stored` (default), `synthetic` and `disabled`. The index setting can be
25+
used as follows:
26+
27+
[source,js]
28+
----
29+
"settings": {
30+
"index.mapping.source.mode": "synthetic"
31+
}
32+
"mappings": {
33+
"foo": {
34+
"type": "keyword"
35+
},
36+
"bar": {
37+
"type": "keyword"
38+
}
39+
}
40+
----
41+
// NOTCONSOLE
42+
43+
Existing indexes using the deprecated method for configuring the source mode are not
44+
affected, but creating new indexes raises warnings and will not be supported in a future
45+
release. This can be an issue for data streams and other indexes that get regularly
46+
generated using component templates. To avoid these problems, identify all affected
47+
component templates, as shown in the <<migration-api-deprecation,deprecation info API>>,
48+
and update them to use setting `index.mapping.source.mode` instead of
49+
`mappings.source.mode`, according to the examples above.
50+
51+
52+

0 commit comments

Comments
 (0)