|
@@ -0,0 +1,819 @@
|
|
|
+---
|
|
|
+create an index with disabled source mode and standard index mode without setting:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_disabled_standard
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: standard
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: disabled
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_disabled_standard
|
|
|
+
|
|
|
+ - match: { test_disabled_standard.mappings._source.mode: disabled }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with stored source mode and standard index mode without setting:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_stored_standard
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: standard
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: stored
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_stored_standard
|
|
|
+
|
|
|
+ - match: { test_stored_standard.mappings._source.mode: stored }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with synthetic source mode and standard index mode without setting:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_synthetic_standard
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: standard
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: synthetic
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_synthetic_standard
|
|
|
+
|
|
|
+ - match: { test_synthetic_standard.mappings._source.mode: synthetic }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with disabled source mode and logsdb index mode without setting:
|
|
|
+ - do:
|
|
|
+ catch: bad_request
|
|
|
+ indices.create:
|
|
|
+ index: test_disabled_logsdb
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: logsdb
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: disabled
|
|
|
+
|
|
|
+ - match: { error.type: "mapper_parsing_exception" }
|
|
|
+ - match: { error.reason: "Failed to parse mapping: Indices with with index mode [logsdb] only support synthetic source" }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with stored source mode and logsdb index mode without setting:
|
|
|
+ - do:
|
|
|
+ catch: bad_request
|
|
|
+ indices.create:
|
|
|
+ index: test_stored_logsdb
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: logsdb
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: stored
|
|
|
+
|
|
|
+ - match: { error.type: "mapper_parsing_exception" }
|
|
|
+ - match: { error.reason: "Failed to parse mapping: Indices with with index mode [logsdb] only support synthetic source" }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with synthetic source mode and logsdb index mode without setting:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_synthetic_logsdb
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: logsdb
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: synthetic
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_synthetic_logsdb
|
|
|
+
|
|
|
+ - match: { test_synthetic_logsdb.mappings._source.mode: synthetic }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with disabled source mode and time series index mode without setting:
|
|
|
+ - do:
|
|
|
+ catch: bad_request
|
|
|
+ indices.create:
|
|
|
+ index: test_disabled_time_series
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: time_series
|
|
|
+ routing_path: [ keyword ]
|
|
|
+ time_series:
|
|
|
+ start_time: 2021-04-28T00:00:00Z
|
|
|
+ end_time: 2021-04-29T00:00:00Z
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: disabled
|
|
|
+ properties:
|
|
|
+ keyword:
|
|
|
+ type: keyword
|
|
|
+ time_series_dimension: true
|
|
|
+
|
|
|
+ - match: { error.type: "mapper_parsing_exception" }
|
|
|
+ - match: { error.reason: "Failed to parse mapping: time series indices only support synthetic source" }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with stored source mode and time series index mode without setting:
|
|
|
+ - do:
|
|
|
+ catch: bad_request
|
|
|
+ indices.create:
|
|
|
+ index: test_stored_time_series
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: time_series
|
|
|
+ routing_path: [ keyword ]
|
|
|
+ time_series:
|
|
|
+ start_time: 2021-04-28T00:00:00Z
|
|
|
+ end_time: 2021-04-29T00:00:00Z
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: stored
|
|
|
+ properties:
|
|
|
+ keyword:
|
|
|
+ type: keyword
|
|
|
+ time_series_dimension: true
|
|
|
+
|
|
|
+ - match: { error.type: "mapper_parsing_exception" }
|
|
|
+ - match: { error.reason: "Failed to parse mapping: time series indices only support synthetic source" }
|
|
|
+
|
|
|
+
|
|
|
+---
|
|
|
+create an index with synthetic source mode and time series index mode without setting:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_synthetic_time_series
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: time_series
|
|
|
+ routing_path: [ keyword ]
|
|
|
+ time_series:
|
|
|
+ start_time: 2021-04-28T00:00:00Z
|
|
|
+ end_time: 2021-04-29T00:00:00Z
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: synthetic
|
|
|
+ properties:
|
|
|
+ keyword:
|
|
|
+ type: keyword
|
|
|
+ time_series_dimension: true
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_settings:
|
|
|
+ index: "test_synthetic_time_series"
|
|
|
+ - match: { test_synthetic_time_series.settings.index.mode: time_series }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_synthetic_time_series
|
|
|
+
|
|
|
+ - match: { test_synthetic_time_series.mappings._source.mode: synthetic }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with stored source mode:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_stored_default
|
|
|
+ body:
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: stored
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_stored_default
|
|
|
+
|
|
|
+ - match: { test_stored_default.mappings._source.mode: stored }
|
|
|
+
|
|
|
+---
|
|
|
+override stored to synthetic source mode:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_stored_override
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: synthetic
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: stored
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_stored_override
|
|
|
+
|
|
|
+ - match: { test_stored_override.mappings._source.mode: synthetic }
|
|
|
+
|
|
|
+---
|
|
|
+override stored to disabled source mode:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_stored_disabled
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: disabled
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: stored
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_stored_disabled
|
|
|
+
|
|
|
+ - match: { test_stored_disabled.mappings._source.mode: disabled }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with disabled source mode:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_disabled_default
|
|
|
+ body:
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: disabled
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_disabled_default
|
|
|
+
|
|
|
+ - match: { test_disabled_default.mappings._source.mode: disabled }
|
|
|
+
|
|
|
+---
|
|
|
+override disabled to synthetic source mode:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_disabled_synthetic
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: synthetic
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: disabled
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_disabled_synthetic
|
|
|
+
|
|
|
+ - match: { test_disabled_synthetic.mappings._source.mode: synthetic }
|
|
|
+
|
|
|
+---
|
|
|
+override disabled to stored source mode:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_disabled_stored
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: stored
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: disabled
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_disabled_stored
|
|
|
+
|
|
|
+ - match: { test_disabled_stored.mappings._source.mode: stored }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with synthetic source mode:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_synthetic_default
|
|
|
+ body:
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: synthetic
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_synthetic_default
|
|
|
+
|
|
|
+ - match: { test_synthetic_default.mappings._source.mode: synthetic }
|
|
|
+
|
|
|
+---
|
|
|
+override synthetic to stored source mode:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_synthetic_stored
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: stored
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: synthetic
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_synthetic_stored
|
|
|
+
|
|
|
+ - match: { test_synthetic_stored.mappings._source.mode: stored }
|
|
|
+
|
|
|
+---
|
|
|
+override synthetic to disabled source mode:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_synthetic_disabled
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: disabled
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: synthetic
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_synthetic_disabled
|
|
|
+
|
|
|
+ - match: { test_synthetic_disabled.mappings._source.mode: disabled }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with unspecified source mode:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_unset_default
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_unset_default
|
|
|
+
|
|
|
+ - match: { test_unset_default.mappings._source.mode: null }
|
|
|
+
|
|
|
+---
|
|
|
+override unspecified to stored source mode:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_unset_stored
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: stored
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_unset_stored
|
|
|
+
|
|
|
+ - match: { test_unset_stored.mappings: { } }
|
|
|
+
|
|
|
+---
|
|
|
+override unspecified to disabled source mode:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_unset_disabled
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: disabled
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_unset_disabled
|
|
|
+
|
|
|
+ - match: { test_unset_disabled.mappings: { } }
|
|
|
+
|
|
|
+---
|
|
|
+override unspecified to synthetic source mode:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_unset_synthetic
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: synthetic
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_unset_synthetic
|
|
|
+
|
|
|
+ - match: { test_unset_synthetic.mappings: { } }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with standard index mode:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_standard_index_mode
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: standard
|
|
|
+ mappings:
|
|
|
+ _source:
|
|
|
+ mode: stored
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_standard_index_mode
|
|
|
+
|
|
|
+ - match: { test_standard_index_mode.mappings._source.mode: stored }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with time_series index mode and synthetic source:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_time_series_index_mode_synthetic
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: time_series
|
|
|
+ mapping.source.mode: synthetic
|
|
|
+ routing_path: [ keyword ]
|
|
|
+ time_series:
|
|
|
+ start_time: 2021-04-28T00:00:00Z
|
|
|
+ end_time: 2021-04-29T00:00:00Z
|
|
|
+ mappings:
|
|
|
+ properties:
|
|
|
+ keyword:
|
|
|
+ type: keyword
|
|
|
+ time_series_dimension: true
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_settings:
|
|
|
+ index: "test_time_series_index_mode_synthetic"
|
|
|
+ - match: { test_time_series_index_mode_synthetic.settings.index.mode: time_series }
|
|
|
+
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_time_series_index_mode_synthetic
|
|
|
+
|
|
|
+ - match: { test_time_series_index_mode_synthetic.mappings._source.mode: synthetic }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with logsdb index mode and synthetic source:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_logsdb_index_mode_synthetic
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: logsdb
|
|
|
+ mapping.source.mode: synthetic
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_settings:
|
|
|
+ index: "test_logsdb_index_mode_synthetic"
|
|
|
+ - match: { test_logsdb_index_mode_synthetic.settings.index.mode: logsdb }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_logsdb_index_mode_synthetic
|
|
|
+
|
|
|
+ - match: { test_logsdb_index_mode_synthetic.mappings._source.mode: synthetic }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with time_series index mode and stored source:
|
|
|
+ - do:
|
|
|
+ catch: bad_request
|
|
|
+ indices.create:
|
|
|
+ index: test_time_series_index_mode_undefined
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: time_series
|
|
|
+ mapping.source.mode: stored
|
|
|
+ routing_path: [ keyword ]
|
|
|
+ time_series:
|
|
|
+ start_time: 2021-04-28T00:00:00Z
|
|
|
+ end_time: 2021-04-29T00:00:00Z
|
|
|
+ mappings:
|
|
|
+ properties:
|
|
|
+ keyword:
|
|
|
+ type: keyword
|
|
|
+ time_series_dimension: true
|
|
|
+
|
|
|
+ - match: { error.type: "mapper_parsing_exception" }
|
|
|
+ - match: { error.reason: "Failed to parse mapping: time series indices only support synthetic source" }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with logsdb index mode and stored source:
|
|
|
+ - do:
|
|
|
+ catch: bad_request
|
|
|
+ indices.create:
|
|
|
+ index: test_logsdb_index_mode_undefined
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: logsdb
|
|
|
+ mapping.source.mode: stored
|
|
|
+
|
|
|
+ - match: { error.type: "mapper_parsing_exception" }
|
|
|
+ - match: { error.reason: "Failed to parse mapping: Indices with with index mode [logsdb] only support synthetic source" }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with time_series index mode and disabled source:
|
|
|
+ - do:
|
|
|
+ catch: bad_request
|
|
|
+ indices.create:
|
|
|
+ index: test_time_series_index_mode
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: time_series
|
|
|
+ mapping.source.mode: disabled
|
|
|
+ routing_path: [ keyword ]
|
|
|
+ time_series:
|
|
|
+ start_time: 2021-04-28T00:00:00Z
|
|
|
+ end_time: 2021-04-29T00:00:00Z
|
|
|
+ mappings:
|
|
|
+ properties:
|
|
|
+ keyword:
|
|
|
+ type: keyword
|
|
|
+ time_series_dimension: true
|
|
|
+
|
|
|
+ - match: { error.type: "mapper_parsing_exception" }
|
|
|
+ - match: { error.reason: "Failed to parse mapping: _source cannot be disabled in index using [time_series] index mode" }
|
|
|
+
|
|
|
+---
|
|
|
+create an index with logsdb index mode and disabled source:
|
|
|
+ - do:
|
|
|
+ catch: bad_request
|
|
|
+ indices.create:
|
|
|
+ index: test_logsdb_index_mode
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: logsdb
|
|
|
+ mapping.source.mode: disabled
|
|
|
+
|
|
|
+ - match: { error.type: "mapper_parsing_exception" }
|
|
|
+ - match: { error.reason: "Failed to parse mapping: _source cannot be disabled in index using [logsdb] index mode" }
|
|
|
+
|
|
|
+---
|
|
|
+modify final setting after index creation:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_modify_setting
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: stored
|
|
|
+
|
|
|
+ - do:
|
|
|
+ catch: /.*Can't update non dynamic setting.*/
|
|
|
+ indices.put_settings:
|
|
|
+ index: test_modify_setting
|
|
|
+ body:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: synthetic
|
|
|
+
|
|
|
+---
|
|
|
+modify source mapping from stored to disabled after index creation:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_modify_source_mode_stored_disabled
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: stored
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.put_mapping:
|
|
|
+ index: test_modify_source_mode_stored_disabled
|
|
|
+ body:
|
|
|
+ _source:
|
|
|
+ mode: disabled
|
|
|
+ - is_true: acknowledged
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_modify_source_mode_stored_disabled
|
|
|
+ - match: { test_modify_source_mode_stored_disabled.mappings._source.mode: stored }
|
|
|
+
|
|
|
+---
|
|
|
+modify source mapping from stored to synthetic after index creation:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_modify_source_mode_stored_synthetic
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: stored
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.put_mapping:
|
|
|
+ index: test_modify_source_mode_stored_synthetic
|
|
|
+ body:
|
|
|
+ _source:
|
|
|
+ mode: synthetic
|
|
|
+ - is_true: acknowledged
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_modify_source_mode_stored_synthetic
|
|
|
+ - match: { test_modify_source_mode_stored_synthetic.mappings._source.mode: stored }
|
|
|
+
|
|
|
+---
|
|
|
+modify source mapping from disabled to stored after index creation:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_modify_source_mode_disabled_stored
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: disabled
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.put_mapping:
|
|
|
+ index: test_modify_source_mode_disabled_stored
|
|
|
+ body:
|
|
|
+ _source:
|
|
|
+ mode: stored
|
|
|
+ - is_true: acknowledged
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_modify_source_mode_disabled_stored
|
|
|
+ - match: { test_modify_source_mode_disabled_stored.mappings._source.mode: disabled }
|
|
|
+
|
|
|
+---
|
|
|
+modify source mapping from disabled to synthetic after index creation:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_modify_source_mode_disabled_synthetic
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: disabled
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.put_mapping:
|
|
|
+ index: test_modify_source_mode_disabled_synthetic
|
|
|
+ body:
|
|
|
+ _source:
|
|
|
+ mode: synthetic
|
|
|
+ - is_true: acknowledged
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_modify_source_mode_disabled_synthetic
|
|
|
+ - match: { test_modify_source_mode_disabled_synthetic.mappings._source.mode: disabled }
|
|
|
+
|
|
|
+---
|
|
|
+modify source mapping from synthetic to stored after index creation:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_modify_source_mode_synthetic_stored
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: synthetic
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.put_mapping:
|
|
|
+ index: test_modify_source_mode_synthetic_stored
|
|
|
+ body:
|
|
|
+ _source:
|
|
|
+ mode: stored
|
|
|
+ - is_true: acknowledged
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_modify_source_mode_synthetic_stored
|
|
|
+ - match: { test_modify_source_mode_synthetic_stored.mappings._source.mode: synthetic }
|
|
|
+
|
|
|
+---
|
|
|
+modify source mapping from synthetic to disabled after index creation:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_modify_source_mode_synthetic_disabled
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mapping.source.mode: synthetic
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.put_mapping:
|
|
|
+ index: test_modify_source_mode_synthetic_disabled
|
|
|
+ body:
|
|
|
+ _source:
|
|
|
+ mode: disabled
|
|
|
+ - is_true: acknowledged
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.get_mapping:
|
|
|
+ index: test_modify_source_mode_synthetic_disabled
|
|
|
+ - match: { test_modify_source_mode_synthetic_disabled.mappings._source.mode: synthetic }
|
|
|
+
|
|
|
+---
|
|
|
+modify logsdb index source mode to disabled after index creation:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_modify_logsdb_disabled_after_creation
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: logsdb
|
|
|
+
|
|
|
+ - do:
|
|
|
+ catch: bad_request
|
|
|
+ indices.put_mapping:
|
|
|
+ index: test_modify_logsdb_disabled_after_creation
|
|
|
+ body:
|
|
|
+ _source:
|
|
|
+ mode: disabled
|
|
|
+ - match: { error.type: "mapper_parsing_exception" }
|
|
|
+ - match: { error.reason: "Failed to parse mapping: Indices with with index mode [logsdb] only support synthetic source" }
|
|
|
+
|
|
|
+---
|
|
|
+modify logsdb index source mode to stored after index creation:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_modify_logsdb_stored_after_creation
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: logsdb
|
|
|
+
|
|
|
+ - do:
|
|
|
+ catch: bad_request
|
|
|
+ indices.put_mapping:
|
|
|
+ index: test_modify_logsdb_stored_after_creation
|
|
|
+ body:
|
|
|
+ _source:
|
|
|
+ mode: stored
|
|
|
+ - match: { error.type: "mapper_parsing_exception" }
|
|
|
+ - match: { error.reason: "Failed to parse mapping: Indices with with index mode [logsdb] only support synthetic source" }
|
|
|
+
|
|
|
+---
|
|
|
+modify time_series index source mode to disabled after index creation:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_modify_time_series_disabled_after_creation
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: time_series
|
|
|
+ routing_path: [ keyword ]
|
|
|
+ time_series:
|
|
|
+ start_time: 2021-04-28T00:00:00Z
|
|
|
+ end_time: 2021-04-29T00:00:00Z
|
|
|
+ mappings:
|
|
|
+ properties:
|
|
|
+ keyword:
|
|
|
+ type: keyword
|
|
|
+ time_series_dimension: true
|
|
|
+
|
|
|
+ - do:
|
|
|
+ catch: bad_request
|
|
|
+ indices.put_mapping:
|
|
|
+ index: test_modify_time_series_disabled_after_creation
|
|
|
+ body:
|
|
|
+ _source:
|
|
|
+ mode: disabled
|
|
|
+ - match: { error.type: "mapper_parsing_exception" }
|
|
|
+ - match: { error.reason: "Failed to parse mapping: time series indices only support synthetic source" }
|
|
|
+
|
|
|
+---
|
|
|
+modify time_series index source mode to stored after index creation:
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: test_modify_time_series_stored_after_creation
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ index:
|
|
|
+ mode: time_series
|
|
|
+ routing_path: [ keyword ]
|
|
|
+ time_series:
|
|
|
+ start_time: 2021-04-28T00:00:00Z
|
|
|
+ end_time: 2021-04-29T00:00:00Z
|
|
|
+ mappings:
|
|
|
+ properties:
|
|
|
+ keyword:
|
|
|
+ type: keyword
|
|
|
+ time_series_dimension: true
|
|
|
+
|
|
|
+ - do:
|
|
|
+ catch: bad_request
|
|
|
+ indices.put_mapping:
|
|
|
+ index: test_modify_time_series_stored_after_creation
|
|
|
+ body:
|
|
|
+ _source:
|
|
|
+ mode: stored
|
|
|
+ - match: { error.type: "mapper_parsing_exception" }
|
|
|
+ - match: { error.reason: "Failed to parse mapping: time series indices only support synthetic source" }
|