Commit a07accd
committed
First pass at PUT and GET IndexTemplates.
For HLRC support PutIndexTemplateRequest now includes checks to change the toXContent format if it looks like custom doc types are used.
Removed getTypedTemplate method that violated REST-api contract and added parameter to the GetIndexTemplatesRequest for the HLRC client to request typed templates
Removed doc types from HLRC documentation examples
PITR.toXContent() now strips type name from `mapping->_doc->properties` to make untyped REST requests with include_type_name=false
Tidied PutIndexTemplateRequest inconsistencies - some public methods ran mappings through the `internalMappings` validation and some didn’t. All do now.
Added new APIs to take mappings with no doc types embedded in mapping definition blobs which are apis we will document in HLRC. The legacy `source` and `mapping` apis that support type names in the blob are all marked as deprecated.1 parent 1a41d84 commit a07accd
File tree
18 files changed
+452
-107
lines changed- client/rest-high-level/src
- main/java/org/elasticsearch/client
- indices
- test/java/org/elasticsearch/client
- documentation
- docs
- java-rest/high-level/indices
- reference/indices
- qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades
- rest-api-spec/src/main/resources/rest-api-spec
- api
- test/indices.put_template
- server/src/main/java/org/elasticsearch
- action/admin/indices/template
- get
- put
- cluster/metadata
- rest/action/admin/indices
- x-pack/plugin/ilm/qa/multi-node/src/test/java/org/elasticsearch/xpack/indexlifecycle
18 files changed
+452
-107
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| 354 | + | |
354 | 355 | | |
355 | 356 | | |
356 | 357 | | |
| |||
395 | 396 | | |
396 | 397 | | |
397 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
398 | 402 | | |
399 | 403 | | |
400 | 404 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
99 | 109 | | |
Lines changed: 50 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
1229 | 1231 | | |
1230 | 1232 | | |
1231 | 1233 | | |
| 1234 | + | |
1232 | 1235 | | |
1233 | | - | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
1234 | 1253 | | |
1235 | 1254 | | |
1236 | 1255 | | |
1237 | 1256 | | |
1238 | 1257 | | |
1239 | 1258 | | |
1240 | 1259 | | |
1241 | | - | |
| 1260 | + | |
1242 | 1261 | | |
1243 | 1262 | | |
| 1263 | + | |
1244 | 1264 | | |
1245 | | - | |
| 1265 | + | |
1246 | 1266 | | |
1247 | 1267 | | |
1248 | | - | |
| 1268 | + | |
| 1269 | + | |
1249 | 1270 | | |
1250 | 1271 | | |
1251 | 1272 | | |
1252 | 1273 | | |
1253 | 1274 | | |
1254 | | - | |
1255 | | - | |
| 1275 | + | |
| 1276 | + | |
1256 | 1277 | | |
1257 | 1278 | | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
1258 | 1302 | | |
1259 | 1303 | | |
1260 | 1304 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
| 820 | + | |
| 821 | + | |
820 | 822 | | |
821 | 823 | | |
822 | 824 | | |
| 825 | + | |
823 | 826 | | |
824 | 827 | | |
825 | 828 | | |
826 | 829 | | |
827 | | - | |
828 | 830 | | |
829 | 831 | | |
830 | 832 | | |
| |||
Lines changed: 28 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2119 | 2119 | | |
2120 | 2120 | | |
2121 | 2121 | | |
2122 | | - | |
| 2122 | + | |
2123 | 2123 | | |
2124 | | - | |
2125 | | - | |
2126 | | - | |
2127 | | - | |
2128 | | - | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
2129 | 2127 | | |
2130 | 2128 | | |
2131 | | - | |
| 2129 | + | |
2132 | 2130 | | |
2133 | 2131 | | |
2134 | 2132 | | |
2135 | 2133 | | |
2136 | 2134 | | |
2137 | 2135 | | |
2138 | 2136 | | |
2139 | | - | |
2140 | | - | |
2141 | | - | |
2142 | | - | |
2143 | | - | |
2144 | | - | |
2145 | | - | |
2146 | | - | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
2147 | 2147 | | |
2148 | 2148 | | |
2149 | 2149 | | |
| |||
2152 | 2152 | | |
2153 | 2153 | | |
2154 | 2154 | | |
2155 | | - | |
| 2155 | + | |
2156 | 2156 | | |
2157 | | - | |
| 2157 | + | |
2158 | 2158 | | |
2159 | | - | |
2160 | | - | |
2161 | | - | |
2162 | | - | |
2163 | | - | |
| 2159 | + | |
2164 | 2160 | | |
2165 | 2161 | | |
2166 | 2162 | | |
2167 | 2163 | | |
2168 | 2164 | | |
2169 | 2165 | | |
2170 | | - | |
| 2166 | + | |
2171 | 2167 | | |
2172 | 2168 | | |
2173 | 2169 | | |
2174 | 2170 | | |
2175 | 2171 | | |
2176 | | - | |
| 2172 | + | |
2177 | 2173 | | |
2178 | 2174 | | |
2179 | 2175 | | |
| |||
2192 | 2188 | | |
2193 | 2189 | | |
2194 | 2190 | | |
2195 | | - | |
| 2191 | + | |
2196 | 2192 | | |
2197 | 2193 | | |
2198 | 2194 | | |
| |||
2202 | 2198 | | |
2203 | 2199 | | |
2204 | 2200 | | |
2205 | | - | |
2206 | | - | |
2207 | | - | |
2208 | | - | |
2209 | | - | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
2210 | 2204 | | |
2211 | 2205 | | |
2212 | 2206 | | |
| |||
2269 | 2263 | | |
2270 | 2264 | | |
2271 | 2265 | | |
2272 | | - | |
| 2266 | + | |
2273 | 2267 | | |
2274 | | - | |
2275 | | - | |
2276 | | - | |
2277 | | - | |
2278 | | - | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
2279 | 2271 | | |
2280 | 2272 | | |
2281 | 2273 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
| 281 | + | |
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
| |||
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
152 | | - | |
| 155 | + | |
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
160 | | - | |
161 | | - | |
162 | | - | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | | - | |
| 167 | + | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
174 | | - | |
175 | | - | |
176 | | - | |
| 175 | + | |
177 | 176 | | |
178 | 177 | | |
179 | 178 | | |
| |||
189 | 188 | | |
190 | 189 | | |
191 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
192 | 196 | | |
193 | 197 | | |
194 | 198 | | |
| |||
0 commit comments