[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 e8bf344a28.

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

* add reason

* add reason

* spotless

* revert unneeded
This commit is contained in:
Kostas Krikellas 2024-11-04 09:39:34 +02:00 committed by GitHub
parent 82b3b4d716
commit 4573ab8ec1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 615 additions and 427 deletions

View file

@ -349,16 +349,17 @@ sequence number and primary term:
--- ---
synthetic _source: synthetic _source:
- requires: - requires:
cluster_features: ["gte_v8.4.0"] cluster_features: ["mapper.source.mode_from_index_setting"]
reason: introduced in 8.4.0 reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test_synthetic index: test_synthetic
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
page: page:
type: keyword type: keyword

View file

@ -1,4 +1,7 @@
setup: setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test index: test
@ -180,9 +183,9 @@ setup:
body: body:
settings: settings:
number_of_shards: 1 number_of_shards: 1
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
boolean: boolean:
type: boolean type: boolean
@ -5630,9 +5633,9 @@ version and sequence number synthetic _source:
body: body:
settings: settings:
number_of_shards: 1 number_of_shards: 1
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
keyword: keyword:
type: keyword type: keyword

View file

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

View file

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

View file

@ -1,15 +1,16 @@
setup: setup:
- requires: - requires:
cluster_features: ["mapper.source.synthetic_source_fallback"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: introduced in 8.15.0 reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
tags: tags:
type: rank_features type: rank_features

View file

@ -1,15 +1,16 @@
setup: setup:
- requires: - requires:
cluster_features: ["mapper.track_ignored_source"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: requires tracking ignored source reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
a_field: a_field:
type: search_as_you_type type: search_as_you_type

View file

@ -36,15 +36,17 @@
--- ---
"Synthetic source": "Synthetic source":
- requires: - requires:
cluster_features: ["mapper.track_ignored_source"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: requires tracking ignored source reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
count: count:
type: token_count type: token_count

View file

@ -1,15 +1,16 @@
supported: supported:
- requires: - requires:
cluster_features: ["mapper.source.synthetic_source_fallback"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: introduced in 8.15.0 reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
join_field: join_field:
type: join type: join

View file

@ -130,16 +130,17 @@
--- ---
"Synthetic source": "Synthetic source":
- requires: - requires:
cluster_features: ["mapper.source.synthetic_source_fallback"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: introduced in 8.15.0 reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: queries_index index: queries_index
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
query: query:
type: percolator type: percolator

View file

@ -1,11 +1,16 @@
setup: setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: synthetic index: synthetic
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
kwd: kwd:
type: keyword type: keyword

View file

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

View file

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

View file

@ -1,8 +1,8 @@
--- ---
setup: setup:
- requires: - requires:
cluster_features: ["mapper.annotated_text.synthetic_source"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: introduced in 8.15.0 reason: "Source mode configured through index setting"
--- ---
stored annotated_text field: stored annotated_text field:
@ -10,9 +10,10 @@ stored annotated_text field:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
annotated_text: annotated_text:
type: annotated_text type: annotated_text
@ -40,9 +41,10 @@ annotated_text field with keyword multi-field:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
annotated_text: annotated_text:
type: annotated_text type: annotated_text
@ -72,9 +74,10 @@ multiple values in stored annotated_text field:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
annotated_text: annotated_text:
type: annotated_text type: annotated_text
@ -102,9 +105,10 @@ multiple values in annotated_text field with keyword multi-field:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
annotated_text: annotated_text:
type: annotated_text type: annotated_text
@ -135,9 +139,10 @@ multiple values in annotated_text field with stored keyword multi-field:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
annotated_text: annotated_text:
type: annotated_text type: annotated_text
@ -169,9 +174,10 @@ multiple values in stored annotated_text field with keyword multi-field:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
annotated_text: annotated_text:
type: annotated_text type: annotated_text
@ -202,9 +208,10 @@ fallback synthetic source:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
annotated_text: annotated_text:
type: annotated_text type: annotated_text

View file

@ -129,14 +129,18 @@ setup:
--- ---
"Murmur3 docvalue_fields api with synthetic source": "Murmur3 docvalue_fields api with synthetic source":
- requires:
cluster_features: ["mapper.source.mode_from_index_setting"]
reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test_synthetic_source index: test_synthetic_source
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
foo: foo:
type: keyword type: keyword

View file

@ -1,3 +1,9 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
---
keyword: keyword:
- requires: - requires:
cluster_features: ["gte_v8.4.0"] cluster_features: ["gte_v8.4.0"]
@ -7,9 +13,10 @@ keyword:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
kwd: kwd:
type: keyword type: keyword
@ -48,9 +55,8 @@ fetch without refresh also produces synthetic source:
settings: settings:
index: index:
refresh_interval: -1 refresh_interval: -1
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
obj: obj:
properties: properties:
@ -90,9 +96,10 @@ force_synthetic_source_ok:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: stored
mappings: mappings:
_source:
mode: stored
properties: properties:
obj: obj:
properties: properties:
@ -139,9 +146,10 @@ stored text:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
text: text:
type: text type: text
@ -212,9 +220,10 @@ stored keyword:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
kwd: kwd:
type: keyword type: keyword
@ -253,9 +262,10 @@ doc values keyword with ignore_above:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
kwd: kwd:
type: keyword type: keyword
@ -336,9 +346,10 @@ stored keyword with ignore_above:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
kwd: kwd:
type: keyword type: keyword
@ -421,9 +432,10 @@ indexed dense vectors:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -465,9 +477,10 @@ non-indexed dense vectors:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -508,9 +521,10 @@ _source filtering:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
kwd: kwd:
type: keyword type: keyword
@ -550,9 +564,9 @@ _doc_count:
indices.create: indices.create:
index: test index: test
body: body:
mappings: settings:
_source: index:
mode: synthetic mapping.source.mode: synthetic
# with _doc_count # with _doc_count
- do: - do:
@ -679,9 +693,10 @@ fields with ignore_malformed:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
ip: ip:
type: ip type: ip
@ -914,9 +929,10 @@ flattened field:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
flattened: flattened:
type: flattened type: flattened
@ -1006,9 +1022,10 @@ flattened field with ignore_above:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
field: field:
type: flattened type: flattened
@ -1061,9 +1078,10 @@ flattened field with ignore_above and arrays:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
field: field:
type: flattened type: flattened
@ -1117,9 +1135,10 @@ completion:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
completion: completion:
type: completion type: completion

View file

@ -1,3 +1,8 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
--- ---
object with unmapped fields: object with unmapped fields:
- requires: - requires:
@ -11,13 +16,11 @@ object with unmapped fields:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
total_fields: total_fields:
ignore_dynamic_beyond_limit: true ignore_dynamic_beyond_limit: true
limit: 1 limit: 1
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -64,13 +67,12 @@ unmapped arrays:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
total_fields: total_fields:
ignore_dynamic_beyond_limit: true ignore_dynamic_beyond_limit: true
limit: 1 limit: 1
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -111,13 +113,12 @@ nested object with unmapped fields:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
total_fields: total_fields:
ignore_dynamic_beyond_limit: true ignore_dynamic_beyond_limit: true
limit: 3 limit: 3
mappings: mappings:
_source:
mode: synthetic
properties: properties:
path: path:
properties: properties:
@ -163,13 +164,12 @@ empty object with unmapped fields:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
total_fields: total_fields:
ignore_dynamic_beyond_limit: true ignore_dynamic_beyond_limit: true
limit: 3 limit: 3
mappings: mappings:
_source:
mode: synthetic
properties: properties:
path: path:
properties: properties:
@ -205,9 +205,10 @@ disabled root object:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
enabled: false enabled: false
- do: - do:
@ -242,9 +243,10 @@ disabled object:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
path: path:
enabled: false enabled: false
@ -279,9 +281,10 @@ disabled object contains array:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
path: path:
enabled: false enabled: false
@ -319,9 +322,10 @@ disabled subobject:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
path: path:
properties: properties:
@ -357,9 +361,10 @@ disabled subobject with array:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
path: path:
properties: properties:
@ -396,9 +401,10 @@ mixed disabled and enabled objects:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
path: path:
properties: properties:
@ -442,9 +448,10 @@ object with dynamic override:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
path_no: path_no:
dynamic: false dynamic: false
@ -489,9 +496,10 @@ subobject with dynamic override:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
path: path:
properties: properties:
@ -537,9 +545,10 @@ object array in object with dynamic override:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
id: id:
type: integer type: integer
@ -591,9 +600,10 @@ value array in object with dynamic override:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
path_no: path_no:
dynamic: false dynamic: false
@ -634,9 +644,10 @@ nested object:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
nested_field: nested_field:
type: nested type: nested
@ -679,9 +690,10 @@ nested object next to regular:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
path: path:
properties: properties:
@ -725,9 +737,10 @@ nested object with disabled:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
obj_field: obj_field:
properties: properties:
@ -813,9 +826,10 @@ doubly nested object:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
obj_field: obj_field:
properties: properties:
@ -908,9 +922,10 @@ subobjects auto:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
subobjects: auto subobjects: auto
properties: properties:
id: id:
@ -996,9 +1011,10 @@ synthetic_source with copy_to:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
number: number:
type: integer type: integer
@ -1132,9 +1148,10 @@ synthetic_source with disabled doc_values:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
number: number:
type: integer type: integer
@ -1215,9 +1232,10 @@ fallback synthetic_source for text field:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
text: text:
type: text type: text
@ -1249,9 +1267,10 @@ synthetic_source with copy_to and ignored values:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -1317,9 +1336,10 @@ synthetic_source with copy_to field having values in source:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -1380,9 +1400,10 @@ synthetic_source with ignored source field using copy_to:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -1444,9 +1465,10 @@ synthetic_source with copy_to field from dynamic template having values in sourc
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
dynamic_templates: dynamic_templates:
- copy_template: - copy_template:
match: "k" match: "k"
@ -1541,9 +1563,10 @@ synthetic_source with copy_to and invalid values for copy:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -1577,9 +1600,10 @@ synthetic_source with copy_to pointing inside object:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -1681,9 +1705,10 @@ synthetic_source with copy_to pointing to ambiguous field:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
k: k:
type: keyword type: keyword
@ -1728,9 +1753,10 @@ synthetic_source with copy_to pointing to ambiguous field and subobjects false:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
subobjects: false subobjects: false
properties: properties:
k: k:
@ -1776,9 +1802,10 @@ synthetic_source with copy_to pointing to ambiguous field and subobjects auto:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
subobjects: auto subobjects: auto
properties: properties:
k: k:
@ -1825,9 +1852,10 @@ synthetic_source with copy_to pointing at dynamic field:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -1911,9 +1939,10 @@ synthetic_source with copy_to pointing inside dynamic object:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword

View file

@ -1,3 +1,8 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
--- ---
object param - store complex object: object param - store complex object:
- requires: - requires:
@ -8,9 +13,10 @@ object param - store complex object:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
id: id:
type: integer type: integer
@ -72,9 +78,10 @@ object param - object array:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
id: id:
type: integer type: integer
@ -136,9 +143,10 @@ object param - object array within array:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
stored: stored:
synthetic_source_keep: arrays synthetic_source_keep: arrays
@ -179,9 +187,10 @@ object param - no object array:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
stored: stored:
synthetic_source_keep: arrays synthetic_source_keep: arrays
@ -221,9 +230,10 @@ object param - field ordering in object array:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
a: a:
type: keyword type: keyword
@ -270,9 +280,10 @@ object param - nested object array next to other fields:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
a: a:
type: keyword type: keyword
@ -326,9 +337,10 @@ object param - nested object with stored array:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -378,9 +390,10 @@ index param - nested array within array:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -428,9 +441,9 @@ index param - nested array within array - disabled second pass:
index: index:
synthetic_source: synthetic_source:
enable_second_doc_parsing_pass: false enable_second_doc_parsing_pass: false
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -478,9 +491,8 @@ stored field under object with store_array_source:
index: index:
sort.field: "name" sort.field: "name"
sort.order: "asc" sort.order: "asc"
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -525,9 +537,10 @@ field param - keep root array:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
id: id:
type: integer type: integer
@ -582,9 +595,10 @@ field param - keep nested array:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
id: id:
type: integer type: integer
@ -650,9 +664,10 @@ field param - keep root singleton fields:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
id: id:
type: integer type: integer
@ -739,9 +754,10 @@ field param - keep nested singleton fields:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
id: id:
type: integer type: integer
@ -820,9 +836,10 @@ field param - nested array within array:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -866,10 +883,9 @@ index param - root arrays:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
synthetic_source_keep: arrays synthetic_source_keep: arrays
mappings: mappings:
_source:
mode: synthetic
properties: properties:
id: id:
type: integer type: integer
@ -945,10 +961,9 @@ index param - dynamic root arrays:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
synthetic_source_keep: arrays synthetic_source_keep: arrays
mappings: mappings:
_source:
mode: synthetic
properties: properties:
id: id:
type: integer type: integer
@ -998,10 +1013,9 @@ index param - object array within array:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
synthetic_source_keep: arrays synthetic_source_keep: arrays
mappings: mappings:
_source:
mode: synthetic
properties: properties:
stored: stored:
properties: properties:
@ -1048,10 +1062,9 @@ index param - no object array:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
synthetic_source_keep: arrays synthetic_source_keep: arrays
mappings: mappings:
_source:
mode: synthetic
properties: properties:
stored: stored:
properties: properties:
@ -1093,10 +1106,9 @@ index param - field ordering:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
synthetic_source_keep: arrays synthetic_source_keep: arrays
mappings: mappings:
_source:
mode: synthetic
properties: properties:
a: a:
type: keyword type: keyword
@ -1144,10 +1156,9 @@ index param - nested arrays:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
synthetic_source_keep: arrays synthetic_source_keep: arrays
mappings: mappings:
_source:
mode: synthetic
properties: properties:
a: a:
type: keyword type: keyword
@ -1212,10 +1223,9 @@ index param - nested object with stored array:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
synthetic_source_keep: arrays synthetic_source_keep: arrays
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -1264,10 +1274,9 @@ index param - flattened fields:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
synthetic_source_keep: arrays synthetic_source_keep: arrays
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword

View file

@ -145,41 +145,19 @@
- is_false: test_index.mappings.properties.foo.meta.bar - is_false: test_index.mappings.properties.foo.meta.bar
- match: { test_index.mappings.properties.foo.meta.baz: "quux" } - match: { test_index.mappings.properties.foo.meta.baz: "quux" }
---
"disabling synthetic source fails":
- requires:
cluster_features: ["gte_v8.4.0"]
reason: "Added in 8.4.0"
- do:
indices.create:
index: test_index
body:
mappings:
_source:
mode: synthetic
- do:
catch: /Cannot update parameter \[mode\] from \[synthetic\] to \[stored\]/
indices.put_mapping:
index: test_index
body:
_source:
mode: stored
--- ---
"enabling synthetic source from explicit succeeds": "enabling synthetic source from explicit succeeds":
- requires: - requires:
cluster_features: [ "gte_v8.4.0" ] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Added in 8.4.0" reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test_index index: test_index
body: body:
mappings: settings:
_source: index:
mode: stored mapping.source.mode: stored
- do: - do:
indices.put_mapping: indices.put_mapping:

View file

@ -1,9 +1,10 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
--- ---
synthetic _source is default: synthetic _source is default:
- requires:
cluster_features: ["mapper.source.remove_synthetic_source_only_validation"]
reason: requires new validation logic
- do: - do:
indices.create: indices.create:
index: test-default-source index: test-default-source
@ -19,10 +20,6 @@ synthetic _source is default:
--- ---
stored _source mode is supported: stored _source mode is supported:
- requires:
cluster_features: ["mapper.source.remove_synthetic_source_only_validation"]
reason: requires new validation logic
- do: - do:
indices.create: indices.create:
index: test-stored-source index: test-stored-source
@ -30,9 +27,7 @@ stored _source mode is supported:
settings: settings:
index: index:
mode: logsdb mode: logsdb
mappings: mapping.source.mode: stored
_source:
mode: stored
- do: - do:
indices.get: indices.get:
index: test-stored-source index: test-stored-source
@ -41,10 +36,6 @@ stored _source mode is supported:
--- ---
disabled _source is not supported: disabled _source is not supported:
- requires:
cluster_features: ["mapper.source.remove_synthetic_source_only_validation"]
reason: requires new error message
- do: - do:
catch: bad_request catch: bad_request
indices.create: indices.create:
@ -69,9 +60,7 @@ disabled _source is not supported:
settings: settings:
index: index:
mode: logsdb mode: logsdb
mappings: mapping.source.mode: disabled
_source:
mode: disabled
- match: { error.type: "mapper_parsing_exception" } - match: { error.type: "mapper_parsing_exception" }
- match: { error.root_cause.0.type: "mapper_parsing_exception" } - match: { error.root_cause.0.type: "mapper_parsing_exception" }
@ -79,10 +68,6 @@ disabled _source is not supported:
--- ---
include/exclude is not supported with synthetic _source: include/exclude is not supported with synthetic _source:
- requires:
cluster_features: ["mapper.source.remove_synthetic_source_only_validation"]
reason: requires new validation logic
- do: - do:
catch: '/filtering the stored _source is incompatible with synthetic source/' catch: '/filtering the stored _source is incompatible with synthetic source/'
indices.create: indices.create:
@ -109,10 +94,6 @@ include/exclude is not supported with synthetic _source:
--- ---
include/exclude is supported with stored _source: include/exclude is supported with stored _source:
- requires:
cluster_features: ["mapper.source.remove_synthetic_source_only_validation"]
reason: requires new validation logic
- do: - do:
indices.create: indices.create:
index: test-includes index: test-includes
@ -120,9 +101,9 @@ include/exclude is supported with stored _source:
settings: settings:
index: index:
mode: logsdb mode: logsdb
mapping.source.mode: stored
mappings: mappings:
_source: _source:
mode: stored
includes: [a] includes: [a]
- do: - do:
@ -139,9 +120,9 @@ include/exclude is supported with stored _source:
settings: settings:
index: index:
mode: logsdb mode: logsdb
mapping.source.mode: stored
mappings: mappings:
_source: _source:
mode: stored
excludes: [b] excludes: [b]
- do: - do:

View file

@ -1,3 +1,9 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
---
keyword: keyword:
- requires: - requires:
cluster_features: ["gte_v8.4.0"] cluster_features: ["gte_v8.4.0"]
@ -7,9 +13,10 @@ keyword:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
kwd: kwd:
type: keyword type: keyword
@ -62,9 +69,9 @@ keyword with normalizer:
type: custom type: custom
filter: filter:
- lowercase - lowercase
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
keyword: keyword:
type: keyword type: keyword
@ -144,9 +151,10 @@ stored text:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
text: text:
type: text type: text
@ -193,9 +201,10 @@ force_synthetic_source_ok:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: stored
mappings: mappings:
_source:
mode: stored
properties: properties:
obj: obj:
properties: properties:

View file

@ -1,7 +1,7 @@
setup: setup:
- requires: - requires:
cluster_features: ["gte_v8.4.0"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: introduced in 8.4.0 reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
@ -9,9 +9,9 @@ setup:
body: body:
settings: settings:
number_of_shards: 1 number_of_shards: 1
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
foo: foo:
type: keyword type: keyword
@ -21,6 +21,7 @@ setup:
index_options: positions index_options: positions
vectors: vectors:
type: text type: text
store: false
term_vector: with_positions_offsets term_vector: with_positions_offsets
positions: positions:
type: text type: text

View file

@ -387,16 +387,17 @@
"sparse_vector synthetic source": "sparse_vector synthetic source":
- requires: - requires:
cluster_features: ["mapper.source.synthetic_source_fallback"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: introduced in 8.15.0 reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
ml.tokens: ml.tokens:
type: sparse_vector type: sparse_vector

View file

@ -49,15 +49,17 @@
--- ---
"binary synthetic source": "binary synthetic source":
- requires: - requires:
cluster_features: "gte_v8.15.0" cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: synthetic source support introduced in 8.15 reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
binary: binary:
type: binary type: binary

View file

@ -1,3 +1,9 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
---
keyword: keyword:
- requires: - requires:
cluster_features: ["gte_v8.4.0"] cluster_features: ["gte_v8.4.0"]
@ -7,9 +13,10 @@ keyword:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
kwd: kwd:
type: keyword type: keyword
@ -44,9 +51,10 @@ stored text:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
text: text:
type: text type: text
@ -83,8 +91,6 @@ stored keyword:
index: test index: test
body: body:
mappings: mappings:
_source:
mode: synthetic
properties: properties:
kwd: kwd:
type: keyword type: keyword
@ -120,9 +126,10 @@ stored keyword without sibling fields:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
kwd: kwd:
type: keyword type: keyword
@ -165,9 +172,10 @@ force_synthetic_source_ok:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: stored
mappings: mappings:
_source:
mode: stored
properties: properties:
obj: obj:
properties: properties:
@ -218,9 +226,10 @@ doc values keyword with ignore_above:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
kwd: kwd:
type: keyword type: keyword
@ -286,9 +295,10 @@ stored keyword with ignore_above:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
kwd: kwd:
type: keyword type: keyword
@ -356,9 +366,10 @@ _source filtering:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
kwd: kwd:
type: keyword type: keyword
@ -397,9 +408,9 @@ _doc_count:
indices.create: indices.create:
index: test index: test
body: body:
mappings: settings:
_source: index:
mode: synthetic mapping.source.mode: synthetic
- do: - do:
index: index:

View file

@ -1,3 +1,8 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
--- ---
ignore_above mapping level setting: ignore_above mapping level setting:
- requires: - requires:
@ -10,10 +15,9 @@ ignore_above mapping level setting:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
ignore_above: 10 ignore_above: 10
mappings: mappings:
_source:
mode: synthetic
properties: properties:
keyword: keyword:
type: keyword type: keyword
@ -53,10 +57,9 @@ ignore_above mapping level setting on arrays:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
ignore_above: 10 ignore_above: 10
mappings: mappings:
_source:
mode: synthetic
properties: properties:
keyword: keyword:
type: keyword type: keyword
@ -97,10 +100,9 @@ ignore_above mapping overrides setting:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
ignore_above: 10 ignore_above: 10
mappings: mappings:
_source:
mode: synthetic
properties: properties:
keyword: keyword:
type: keyword type: keyword
@ -143,10 +145,9 @@ ignore_above mapping overrides setting on arrays:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
ignore_above: 10 ignore_above: 10
mappings: mappings:
_source:
mode: synthetic
properties: properties:
keyword: keyword:
type: keyword type: keyword

View file

@ -427,8 +427,8 @@ nested fields:
--- ---
"Synthetic source": "Synthetic source":
- requires: - requires:
cluster_features: ["gte_v8.10.0"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: Synthetic source shows up in the mapping in 8.10 reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
@ -458,8 +458,8 @@ nested fields:
--- ---
stored source is supported: stored source is supported:
- requires: - requires:
cluster_features: ["mapper.source.remove_synthetic_source_only_validation"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: requires new validation logic reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
@ -472,9 +472,9 @@ stored source is supported:
time_series: time_series:
start_time: 2021-04-28T00:00:00Z start_time: 2021-04-28T00:00:00Z
end_time: 2021-04-29T00:00:00Z end_time: 2021-04-29T00:00:00Z
mapping:
source.mode: stored
mappings: mappings:
_source:
mode: stored
properties: properties:
"@timestamp": "@timestamp":
type: date type: date
@ -495,8 +495,8 @@ stored source is supported:
--- ---
disabled source is not supported: disabled source is not supported:
- requires: - requires:
cluster_features: ["mapper.source.remove_synthetic_source_only_validation"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: requires new error message reason: "Source mode configured through index setting"
- do: - do:
catch: bad_request catch: bad_request
@ -510,9 +510,9 @@ disabled source is not supported:
time_series: time_series:
start_time: 2021-04-28T00:00:00Z start_time: 2021-04-28T00:00:00Z
end_time: 2021-04-29T00:00:00Z end_time: 2021-04-29T00:00:00Z
mapping:
source.mode: disabled
mappings: mappings:
_source:
mode: disabled
properties: properties:
"@timestamp": "@timestamp":
type: date type: date

View file

@ -1,3 +1,9 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
---
keyword: keyword:
- requires: - requires:
cluster_features: ["gte_v8.4.0"] cluster_features: ["gte_v8.4.0"]
@ -7,9 +13,10 @@ keyword:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
kwd: kwd:
type: keyword type: keyword
@ -65,9 +72,10 @@ stored text:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
text: text:
type: text type: text

View file

@ -63,6 +63,7 @@ public class MapperFeatures implements FeatureSpecification {
RangeFieldMapper.DATE_RANGE_INDEXING_FIX, RangeFieldMapper.DATE_RANGE_INDEXING_FIX,
IgnoredSourceFieldMapper.DONT_EXPAND_DOTS_IN_IGNORED_SOURCE, IgnoredSourceFieldMapper.DONT_EXPAND_DOTS_IN_IGNORED_SOURCE,
SourceFieldMapper.REMOVE_SYNTHETIC_SOURCE_ONLY_VALIDATION, SourceFieldMapper.REMOVE_SYNTHETIC_SOURCE_ONLY_VALIDATION,
SourceFieldMapper.SOURCE_MODE_FROM_INDEX_SETTING,
IgnoredSourceFieldMapper.IGNORED_SOURCE_AS_TOP_LEVEL_METADATA_ARRAY_FIELD, IgnoredSourceFieldMapper.IGNORED_SOURCE_AS_TOP_LEVEL_METADATA_ARRAY_FIELD,
IgnoredSourceFieldMapper.ALWAYS_STORE_OBJECT_ARRAYS_IN_NESTED_OBJECTS, IgnoredSourceFieldMapper.ALWAYS_STORE_OBJECT_ARRAYS_IN_NESTED_OBJECTS,
MapperService.LOGSDB_DEFAULT_IGNORE_DYNAMIC_BEYOND_LIMIT MapperService.LOGSDB_DEFAULT_IGNORE_DYNAMIC_BEYOND_LIMIT

View file

@ -54,6 +54,7 @@ public class SourceFieldMapper extends MetadataFieldMapper {
public static final NodeFeature REMOVE_SYNTHETIC_SOURCE_ONLY_VALIDATION = new NodeFeature( public static final NodeFeature REMOVE_SYNTHETIC_SOURCE_ONLY_VALIDATION = new NodeFeature(
"mapper.source.remove_synthetic_source_only_validation" "mapper.source.remove_synthetic_source_only_validation"
); );
public static final NodeFeature SOURCE_MODE_FROM_INDEX_SETTING = new NodeFeature("mapper.source.mode_from_index_setting");
public static final String NAME = "_source"; public static final String NAME = "_source";
public static final String RECOVERY_SOURCE_NAME = "_recovery_source"; public static final String RECOVERY_SOURCE_NAME = "_recovery_source";

View file

@ -2,13 +2,18 @@
setup: setup:
- skip: - skip:
features: headers features: headers
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
object: object:
enabled: false enabled: false

View file

@ -1,15 +1,16 @@
constant_keyword: constant_keyword:
- requires: - requires:
cluster_features: ["gte_v8.4.0"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: introduced in 8.4.0 reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
const_kwd: const_kwd:
type: constant_keyword type: constant_keyword

View file

@ -1,3 +1,9 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
---
synthetic source: synthetic source:
- requires: - requires:
cluster_features: ["mapper.source.synthetic_source_with_copy_to_and_doc_values_false"] cluster_features: ["mapper.source.synthetic_source_with_copy_to_and_doc_values_false"]
@ -7,9 +13,10 @@ synthetic source:
indices.create: indices.create:
index: synthetic_source_test index: synthetic_source_test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -52,9 +59,10 @@ synthetic source with copy_to:
indices.create: indices.create:
index: synthetic_source_test index: synthetic_source_test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -111,9 +119,10 @@ synthetic source with disabled doc_values:
indices.create: indices.create:
index: synthetic_source_test index: synthetic_source_test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword

View file

@ -1,15 +1,16 @@
setup: setup:
- requires: - requires:
cluster_features: ["gte_v8.5.0"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "synthetic source support added in 8.5.0" reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test1 index: test1
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
ver: ver:
type: version type: version
@ -76,9 +77,10 @@ synthetic source with copy_to:
indices.create: indices.create:
index: synthetic_source_test index: synthetic_source_test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
ver: ver:
type: version type: version

View file

@ -1,3 +1,9 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
---
aggregate_metric_double: aggregate_metric_double:
- requires: - requires:
cluster_features: ["gte_v8.5.0"] cluster_features: ["gte_v8.5.0"]
@ -7,9 +13,10 @@ aggregate_metric_double:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
metric: metric:
type: aggregate_metric_double type: aggregate_metric_double
@ -62,9 +69,10 @@ aggregate_metric_double with ignore_malformed:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
metric: metric:
type: aggregate_metric_double type: aggregate_metric_double

View file

@ -175,16 +175,17 @@ setup:
--- ---
histogram with synthetic source: histogram with synthetic source:
- requires: - requires:
cluster_features: ["gte_v8.5.0"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: introduced in 8.5.0 reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: histo_synthetic index: histo_synthetic
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
latency: latency:
type: histogram type: histogram
@ -221,16 +222,17 @@ histogram with synthetic source:
--- ---
histogram with synthetic source and zero counts: histogram with synthetic source and zero counts:
- requires: - requires:
cluster_features: ["gte_v8.5.0"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: introduced in 8.5.0 reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: histo_synthetic index: histo_synthetic
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
latency: latency:
type: histogram type: histogram
@ -310,16 +312,17 @@ histogram with large count values:
--- ---
histogram with synthetic source and ignore_malformed: histogram with synthetic source and ignore_malformed:
- requires: - requires:
cluster_features: ["mapper.track_ignored_source"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: introduced in 8.15.0 reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: histo_synthetic index: histo_synthetic
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
latency: latency:
type: histogram type: histogram

View file

@ -1,12 +1,17 @@
--- ---
setup: setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: source index: source
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
baz: baz:
type: keyword type: keyword

View file

@ -805,13 +805,18 @@ text:
--- ---
synthetic _source text stored: synthetic _source text stored:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
card: card:
type: text type: text
@ -836,13 +841,18 @@ synthetic _source text stored:
--- ---
synthetic _source text with parent keyword: synthetic _source text with parent keyword:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
card: card:
type: keyword type: keyword

View file

@ -477,13 +477,18 @@ setup:
--- ---
"text with synthetic source": "text with synthetic source":
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test2 index: test2
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
"emp_no": "emp_no":
type: long type: long
@ -522,13 +527,18 @@ setup:
--- ---
"stored text with synthetic source": "stored text with synthetic source":
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test2 index: test2
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
"emp_no": "emp_no":
type: long type: long

View file

@ -1,8 +1,8 @@
--- ---
setup: setup:
- requires: - requires:
cluster_features: ["gte_v8.5.0"] cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: added in 8.5 reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
@ -11,9 +11,9 @@ setup:
settings: settings:
number_of_shards: 1 number_of_shards: 1
number_of_replicas: 0 number_of_replicas: 0
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
obj: obj:
properties: properties:

View file

@ -2,6 +2,9 @@
setup: setup:
- skip: - skip:
features: headers features: headers
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
- do: - do:
cluster.health: cluster.health:
@ -13,9 +16,10 @@ Filter single field:
indices.create: indices.create:
index: index_fls index: index_fls
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -75,9 +79,10 @@ Filter fields in object:
indices.create: indices.create:
index: index_fls index: index_fls
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -142,9 +147,10 @@ Fields under a disabled object - uses _ignored_source:
indices.create: indices.create:
index: index_fls index: index_fls
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -236,12 +242,11 @@ Dynamic fields beyond limit - uses _ignored_source:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
total_fields: total_fields:
ignore_dynamic_beyond_limit: true ignore_dynamic_beyond_limit: true
limit: 2 limit: 2
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -301,9 +306,10 @@ Field with ignored_malformed:
indices.create: indices.create:
index: index_fls index: index_fls
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword

View file

@ -2,6 +2,9 @@
setup: setup:
- skip: - skip:
features: headers features: headers
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
- do: - do:
cluster.health: cluster.health:
@ -13,9 +16,10 @@ Filter on single field:
indices.create: indices.create:
index: index_dls index: index_dls
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -95,9 +99,10 @@ Filter on nested field:
indices.create: indices.create:
index: index_dls index: index_dls
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -178,9 +183,10 @@ Filter on object with stored source:
indices.create: indices.create:
index: index_dls index: index_dls
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -258,9 +264,10 @@ Filter on field within a disabled object:
indices.create: indices.create:
index: index_dls index: index_dls
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -335,9 +342,10 @@ Filter on field with ignored_malformed:
indices.create: indices.create:
index: index_dls index: index_dls
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword

View file

@ -95,17 +95,19 @@ setup:
"Failed to snapshot indices with synthetic source": "Failed to snapshot indices with synthetic source":
- skip: - skip:
features: ["allowed_warnings"] features: ["allowed_warnings"]
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
- do: - do:
indices.create: indices.create:
index: test_synthetic index: test_synthetic
body: body:
mappings:
_source:
mode: synthetic
settings: settings:
number_of_shards: 1 number_of_shards: 1
number_of_replicas: 0 number_of_replicas: 0
index:
mapping.source.mode: synthetic
- do: - do:
snapshot.create: snapshot.create:

View file

@ -1,3 +1,8 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
--- ---
"geo_shape": "geo_shape":
- requires: - requires:
@ -8,9 +13,10 @@
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
shape: shape:
type: geo_shape type: geo_shape
@ -74,9 +80,10 @@
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
shape: shape:
type: geo_shape type: geo_shape
@ -157,9 +164,10 @@
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
shape: shape:
type: shape type: shape
@ -223,9 +231,10 @@
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
shape: shape:
type: shape type: shape
@ -306,9 +315,10 @@
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
point: point:
type: geo_point type: geo_point
@ -422,9 +432,10 @@
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
geo_point: geo_point:
type: geo_point type: geo_point
@ -501,9 +512,10 @@
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
point: point:
type: point type: point
@ -597,9 +609,10 @@
indices.create: indices.create:
index: test index: test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
point: point:
type: point type: point

View file

@ -1,3 +1,9 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
---
simple: simple:
- skip: - skip:
features: headers features: headers
@ -6,9 +12,10 @@ simple:
indices.create: indices.create:
index: airline-data index: airline-data
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
time: time:
type: date type: date

View file

@ -1,3 +1,8 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
--- ---
wildcard field type ignore_above: wildcard field type ignore_above:
- requires: - requires:
@ -10,10 +15,9 @@ wildcard field type ignore_above:
settings: settings:
index: index:
mapping: mapping:
source.mode: synthetic
ignore_above: 10 ignore_above: 10
mappings: mappings:
_source:
mode: synthetic
properties: properties:
a_wildcard: a_wildcard:
type: wildcard type: wildcard

View file

@ -1,3 +1,9 @@
setup:
- requires:
cluster_features: [ "mapper.source.mode_from_index_setting" ]
reason: "Source mode configured through index setting"
---
synthetic source: synthetic source:
- requires: - requires:
cluster_features: ["mapper.source.synthetic_source_with_copy_to_and_doc_values_false"] cluster_features: ["mapper.source.synthetic_source_with_copy_to_and_doc_values_false"]
@ -7,9 +13,10 @@ synthetic source:
indices.create: indices.create:
index: synthetic_source_test index: synthetic_source_test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword
@ -48,9 +55,10 @@ synthetic source with copy_to:
indices.create: indices.create:
index: synthetic_source_test index: synthetic_source_test
body: body:
settings:
index:
mapping.source.mode: synthetic
mappings: mappings:
_source:
mode: synthetic
properties: properties:
name: name:
type: keyword type: keyword