Skip to content

Commit

Permalink
[TEST] Replace _source.mode with index.mapping.source.mode in integra…
Browse files Browse the repository at this point in the history
…tion tests - take 2 (elastic#116072)

* Reapply "[TEST] Replace _source.mode with index.mapping.source.mode in integra…" (elastic#116069)

This reverts commit e8bf344.

* [TEST] Replace _source.mode with index.mapping.source.mode in integration tests

* add reason

* add reason

* spotless

* revert unneeded
  • Loading branch information
kkrik-es authored Nov 4, 2024
1 parent 82b3b4d commit 4573ab8
Show file tree
Hide file tree
Showing 46 changed files with 615 additions and 427 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,16 +349,17 @@ sequence number and primary term:
---
synthetic _source:
- requires:
cluster_features: ["gte_v8.4.0"]
reason: introduced in 8.4.0
cluster_features: ["mapper.source.mode_from_index_setting"]
reason: "Source mode configured through index setting"

- do:
indices.create:
index: test_synthetic
body:
settings:
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
page:
type: keyword
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
- do:
indices.create:
index: test
Expand Down Expand Up @@ -180,9 +183,9 @@ setup:
body:
settings:
number_of_shards: 1
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
boolean:
type: boolean
Expand Down Expand Up @@ -5630,9 +5633,9 @@ version and sequence number synthetic _source:
body:
settings:
number_of_shards: 1
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
keyword:
type: keyword
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,17 @@ setup:
---
synthetic_source:
- requires:
cluster_features: ["gte_v8.4.0"]
reason: synthetic source introduced in 8.4.0
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"

- do:
indices.create:
index: synthetic_source_test
body:
settings:
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
foo:
type: match_only_text
Expand Down Expand Up @@ -355,16 +356,17 @@ tsdb:
---
synthetic_source with copy_to:
- requires:
cluster_features: ["mapper.source.synthetic_source_with_copy_to_and_doc_values_false"]
reason: requires copy_to support in synthetic source
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"

- do:
indices.create:
index: synthetic_source_test
body:
settings:
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
foo:
type: match_only_text
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
setup:
- requires:
cluster_features: ["mapper.source.synthetic_source_fallback"]
reason: introduced in 8.15.0
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"

- do:
indices.create:
index: test
body:
settings:
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
pagerank:
type: rank_feature
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
setup:
- requires:
cluster_features: ["mapper.source.synthetic_source_fallback"]
reason: introduced in 8.15.0
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"

- do:
indices.create:
index: test
body:
settings:
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
tags:
type: rank_features
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
setup:
- requires:
cluster_features: ["mapper.track_ignored_source"]
reason: requires tracking ignored source
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"

- do:
indices.create:
index: test
body:
settings:
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
a_field:
type: search_as_you_type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@
---
"Synthetic source":
- requires:
cluster_features: ["mapper.track_ignored_source"]
reason: requires tracking ignored source
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"

- do:
indices.create:
index: test
body:
settings:
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
count:
type: token_count
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
supported:
- requires:
cluster_features: ["mapper.source.synthetic_source_fallback"]
reason: introduced in 8.15.0
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"

- do:
indices.create:
index: test
body:
settings:
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
join_field:
type: join
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,17 @@
---
"Synthetic source":
- requires:
cluster_features: ["mapper.source.synthetic_source_fallback"]
reason: introduced in 8.15.0
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"

- do:
indices.create:
index: queries_index
body:
settings:
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
query:
type: percolator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"

- do:
indices.create:
index: synthetic
body:
settings:
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
kwd:
type: keyword
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
update:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"

- do:
indices.create:
index: synthetic
body:
settings:
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
kwd:
type: keyword
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
---
keywords:
- requires:
cluster_features: ["gte_v7.12.0"]
reason: Runtime mappings support was added in 7.12
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"

- do:
indices.create:
index: index1
body:
settings:
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
field1:
type: keyword
Expand Down Expand Up @@ -69,16 +70,17 @@ keywords:
---
doubles:
- requires:
cluster_features: ["gte_v7.12.0"]
reason: Runtime mappings support was added in 7.12
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"

- do:
indices.create:
index: index1
body:
settings:
index:
mapping.source.mode: synthetic
mappings:
_source:
mode: synthetic
properties:
field1:
type: double
Expand Down
Loading

0 comments on commit 4573ab8

Please sign in to comment.