Skip to content

Commit 4573ab8

Browse files
authored
[TEST] Replace _source.mode with index.mapping.source.mode in integration tests - take 2 (#116072)
* Reapply "[TEST] Replace _source.mode with index.mapping.source.mode in integra…" (#116069) This reverts commit e8bf344. * [TEST] Replace _source.mode with index.mapping.source.mode in integration tests * add reason * add reason * spotless * revert unneeded
1 parent 82b3b4d commit 4573ab8

File tree

46 files changed

+615
-427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+615
-427
lines changed

modules/aggregations/src/yamlRestTest/resources/rest-api-spec/test/aggregations/top_hits.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,16 +349,17 @@ sequence number and primary term:
349349
---
350350
synthetic _source:
351351
- requires:
352-
cluster_features: ["gte_v8.4.0"]
353-
reason: introduced in 8.4.0
352+
cluster_features: ["mapper.source.mode_from_index_setting"]
353+
reason: "Source mode configured through index setting"
354354

355355
- do:
356356
indices.create:
357357
index: test_synthetic
358358
body:
359+
settings:
360+
index:
361+
mapping.source.mode: synthetic
359362
mappings:
360-
_source:
361-
mode: synthetic
362363
properties:
363364
page:
364365
type: keyword

modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/50_script_doc_values.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
setup:
2+
- requires:
3+
cluster_features: [ "mapper.source.mode_from_index_setting" ]
4+
reason: "Source mode configured through index setting"
25
- do:
36
indices.create:
47
index: test
@@ -180,9 +183,9 @@ setup:
180183
body:
181184
settings:
182185
number_of_shards: 1
186+
index:
187+
mapping.source.mode: synthetic
183188
mappings:
184-
_source:
185-
mode: synthetic
186189
properties:
187190
boolean:
188191
type: boolean
@@ -5630,9 +5633,9 @@ version and sequence number synthetic _source:
56305633
body:
56315634
settings:
56325635
number_of_shards: 1
5636+
index:
5637+
mapping.source.mode: synthetic
56335638
mappings:
5634-
_source:
5635-
mode: synthetic
56365639
properties:
56375640
keyword:
56385641
type: keyword

modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/match_only_text/10_basic.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -278,16 +278,17 @@ setup:
278278
---
279279
synthetic_source:
280280
- requires:
281-
cluster_features: ["gte_v8.4.0"]
282-
reason: synthetic source introduced in 8.4.0
281+
cluster_features: [ "mapper.source.mode_from_index_setting" ]
282+
reason: "Source mode configured through index setting"
283283

284284
- do:
285285
indices.create:
286286
index: synthetic_source_test
287287
body:
288+
settings:
289+
index:
290+
mapping.source.mode: synthetic
288291
mappings:
289-
_source:
290-
mode: synthetic
291292
properties:
292293
foo:
293294
type: match_only_text
@@ -355,16 +356,17 @@ tsdb:
355356
---
356357
synthetic_source with copy_to:
357358
- requires:
358-
cluster_features: ["mapper.source.synthetic_source_with_copy_to_and_doc_values_false"]
359-
reason: requires copy_to support in synthetic source
359+
cluster_features: [ "mapper.source.mode_from_index_setting" ]
360+
reason: "Source mode configured through index setting"
360361

361362
- do:
362363
indices.create:
363364
index: synthetic_source_test
364365
body:
366+
settings:
367+
index:
368+
mapping.source.mode: synthetic
365369
mappings:
366-
_source:
367-
mode: synthetic
368370
properties:
369371
foo:
370372
type: match_only_text

modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/rank_feature/30_synthetic_source.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
setup:
22
- requires:
3-
cluster_features: ["mapper.source.synthetic_source_fallback"]
4-
reason: introduced in 8.15.0
3+
cluster_features: [ "mapper.source.mode_from_index_setting" ]
4+
reason: "Source mode configured through index setting"
55

66
- do:
77
indices.create:
88
index: test
99
body:
10+
settings:
11+
index:
12+
mapping.source.mode: synthetic
1013
mappings:
11-
_source:
12-
mode: synthetic
1314
properties:
1415
pagerank:
1516
type: rank_feature

modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/rank_features/20_synthetic_source.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
setup:
22
- requires:
3-
cluster_features: ["mapper.source.synthetic_source_fallback"]
4-
reason: introduced in 8.15.0
3+
cluster_features: [ "mapper.source.mode_from_index_setting" ]
4+
reason: "Source mode configured through index setting"
55

66
- do:
77
indices.create:
88
index: test
99
body:
10+
settings:
11+
index:
12+
mapping.source.mode: synthetic
1013
mappings:
11-
_source:
12-
mode: synthetic
1314
properties:
1415
tags:
1516
type: rank_features

modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/search-as-you-type/30_synthetic_source.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
setup:
22
- requires:
3-
cluster_features: ["mapper.track_ignored_source"]
4-
reason: requires tracking ignored source
3+
cluster_features: [ "mapper.source.mode_from_index_setting" ]
4+
reason: "Source mode configured through index setting"
55

66
- do:
77
indices.create:
88
index: test
99
body:
10+
settings:
11+
index:
12+
mapping.source.mode: synthetic
1013
mappings:
11-
_source:
12-
mode: synthetic
1314
properties:
1415
a_field:
1516
type: search_as_you_type

modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/token_count/10_basic.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,17 @@
3636
---
3737
"Synthetic source":
3838
- requires:
39-
cluster_features: ["mapper.track_ignored_source"]
40-
reason: requires tracking ignored source
39+
cluster_features: [ "mapper.source.mode_from_index_setting" ]
40+
reason: "Source mode configured through index setting"
41+
4142
- do:
4243
indices.create:
4344
index: test
4445
body:
46+
settings:
47+
index:
48+
mapping.source.mode: synthetic
4549
mappings:
46-
_source:
47-
mode: synthetic
4850
properties:
4951
count:
5052
type: token_count

modules/parent-join/src/yamlRestTest/resources/rest-api-spec/test/60_synthetic_source.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
supported:
22
- requires:
3-
cluster_features: ["mapper.source.synthetic_source_fallback"]
4-
reason: introduced in 8.15.0
3+
cluster_features: [ "mapper.source.mode_from_index_setting" ]
4+
reason: "Source mode configured through index setting"
55

66
- do:
77
indices.create:
88
index: test
99
body:
10+
settings:
11+
index:
12+
mapping.source.mode: synthetic
1013
mappings:
11-
_source:
12-
mode: synthetic
1314
properties:
1415
join_field:
1516
type: join

modules/percolator/src/yamlRestTest/resources/rest-api-spec/test/10_basic.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,17 @@
130130
---
131131
"Synthetic source":
132132
- requires:
133-
cluster_features: ["mapper.source.synthetic_source_fallback"]
134-
reason: introduced in 8.15.0
133+
cluster_features: [ "mapper.source.mode_from_index_setting" ]
134+
reason: "Source mode configured through index setting"
135135

136136
- do:
137137
indices.create:
138138
index: queries_index
139139
body:
140+
settings:
141+
index:
142+
mapping.source.mode: synthetic
140143
mappings:
141-
_source:
142-
mode: synthetic
143144
properties:
144145
query:
145146
type: percolator

modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/110_synthetic_source.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
setup:
2+
- requires:
3+
cluster_features: [ "mapper.source.mode_from_index_setting" ]
4+
reason: "Source mode configured through index setting"
5+
26
- do:
37
indices.create:
48
index: synthetic
59
body:
10+
settings:
11+
index:
12+
mapping.source.mode: synthetic
613
mappings:
7-
_source:
8-
mode: synthetic
914
properties:
1015
kwd:
1116
type: keyword

0 commit comments

Comments
 (0)