From 352e62019092be3f2304f2e3a500ab5441860cc4 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Wed, 23 Oct 2024 01:36:52 +1300 Subject: [PATCH] Remove unsupported runtime fields types (#634) * Remove unsupported runtime fields types Signed-off-by: Thomas Farr * Update changelog Signed-off-by: Thomas Farr --------- Signed-off-by: Thomas Farr --- CHANGELOG.md | 1 + spec/namespaces/_core.yaml | 4 -- spec/namespaces/indices.yaml | 2 - spec/schemas/_common.mapping.yaml | 51 -------------- spec/schemas/_core.msearch.yaml | 2 - spec/schemas/_core.reindex.yaml | 2 - spec/schemas/asynchronous_search._common.yaml | 2 - spec/schemas/cluster.stats.yaml | 66 ------------------- 8 files changed, 1 insertion(+), 129 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ec8c1b80..3f8d6843c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -134,6 +134,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Removed the ability to skip an individual spec test ([#358](https://github.com/opensearch-project/opensearch-api-specification/pull/358)) - Removed `shape` query ([#531](https://github.com/opensearch-project/opensearch-api-specification/pull/531)) - Removed unsupported DataStream Lifecycle types ([#600](https://github.com/opensearch-project/opensearch-api-specification/pull/600)) +- Removed unsupported runtime field types ([#634](https://github.com/opensearch-project/opensearch-api-specification/pull/634)) ### Fixed diff --git a/spec/namespaces/_core.yaml b/spec/namespaces/_core.yaml index d96136a14..af76fa7e3 100644 --- a/spec/namespaces/_core.yaml +++ b/spec/namespaces/_core.yaml @@ -2349,8 +2349,6 @@ components: $ref: '../schemas/_common.yaml#/components/schemas/Fields' index_filter: $ref: '../schemas/_common.query_dsl.yaml#/components/schemas/QueryContainer' - runtime_mappings: - $ref: '../schemas/_common.mapping.yaml#/components/schemas/RuntimeFields' description: An index filter specified with the Query DSL index: content: @@ -2647,8 +2645,6 @@ components: $ref: '../schemas/_common.yaml#/components/schemas/Fields' pit: $ref: '../schemas/_core.search.yaml#/components/schemas/PointInTimeReference' - runtime_mappings: - $ref: '../schemas/_common.mapping.yaml#/components/schemas/RuntimeFields' stats: description: |- Stats groups to associate with the search. diff --git a/spec/namespaces/indices.yaml b/spec/namespaces/indices.yaml index ad4a4c8dd..cbe075a6d 100644 --- a/spec/namespaces/indices.yaml +++ b/spec/namespaces/indices.yaml @@ -2103,8 +2103,6 @@ components: $ref: '../schemas/_common.mapping.yaml#/components/schemas/RoutingField' _source: $ref: '../schemas/_common.mapping.yaml#/components/schemas/SourceField' - runtime: - $ref: '../schemas/_common.mapping.yaml#/components/schemas/RuntimeFields' description: The mapping definition required: true indices.put_settings: diff --git a/spec/schemas/_common.mapping.yaml b/spec/schemas/_common.mapping.yaml index c08585de3..2ec2dfbda 100644 --- a/spec/schemas/_common.mapping.yaml +++ b/spec/schemas/_common.mapping.yaml @@ -6,53 +6,6 @@ info: paths: {} components: schemas: - RuntimeFields: - type: object - additionalProperties: - $ref: '#/components/schemas/RuntimeField' - RuntimeField: - type: object - properties: - fetch_fields: - description: For type `lookup` - type: array - items: - $ref: '#/components/schemas/RuntimeFieldFetchFields' - format: - description: A custom format for `date` type runtime fields. - type: string - input_field: - $ref: '_common.yaml#/components/schemas/Field' - target_field: - $ref: '_common.yaml#/components/schemas/Field' - target_index: - $ref: '_common.yaml#/components/schemas/IndexName' - script: - $ref: '_common.yaml#/components/schemas/Script' - type: - $ref: '#/components/schemas/RuntimeFieldType' - required: - - type - RuntimeFieldFetchFields: - type: object - properties: - field: - $ref: '_common.yaml#/components/schemas/Field' - format: - type: string - required: - - field - RuntimeFieldType: - type: string - enum: - - boolean - - date - - double - - geo_point - - ip - - keyword - - long - - lookup TypeMapping: type: object properties: @@ -90,10 +43,6 @@ components: $ref: '#/components/schemas/SizeField' _source: $ref: '#/components/schemas/SourceField' - runtime: - type: object - additionalProperties: - $ref: '#/components/schemas/RuntimeField' enabled: type: boolean _data_stream_timestamp: diff --git a/spec/schemas/_core.msearch.yaml b/spec/schemas/_core.msearch.yaml index 19e8c6c9a..04405f280 100644 --- a/spec/schemas/_core.msearch.yaml +++ b/spec/schemas/_core.msearch.yaml @@ -152,8 +152,6 @@ components: version: description: When `true`, returns the document version as part of the hit. type: boolean - runtime_mappings: - $ref: '_common.mapping.yaml#/components/schemas/RuntimeFields' seq_no_primary_term: description: |- When `true`, returns the sequence number and primary term of the last modification. diff --git a/spec/schemas/_core.reindex.yaml b/spec/schemas/_core.reindex.yaml index 481f192ec..fc4a1ae2e 100644 --- a/spec/schemas/_core.reindex.yaml +++ b/spec/schemas/_core.reindex.yaml @@ -42,8 +42,6 @@ components: $ref: '_common.yaml#/components/schemas/Sort' _source: $ref: '_common.yaml#/components/schemas/Fields' - runtime_mappings: - $ref: '_common.mapping.yaml#/components/schemas/RuntimeFields' required: - index RemoteSource: diff --git a/spec/schemas/asynchronous_search._common.yaml b/spec/schemas/asynchronous_search._common.yaml index 691bf9ba9..ce677af0a 100644 --- a/spec/schemas/asynchronous_search._common.yaml +++ b/spec/schemas/asynchronous_search._common.yaml @@ -155,8 +155,6 @@ components: $ref: '_common.yaml#/components/schemas/Fields' pit: $ref: '_core.search.yaml#/components/schemas/PointInTimeReference' - runtime_mappings: - $ref: '_common.mapping.yaml#/components/schemas/RuntimeFields' stats: description: |- Stats groups to associate with the search. diff --git a/spec/schemas/cluster.stats.yaml b/spec/schemas/cluster.stats.yaml index cd6ff6864..55a95cd61 100644 --- a/spec/schemas/cluster.stats.yaml +++ b/spec/schemas/cluster.stats.yaml @@ -201,11 +201,6 @@ components: type: array items: $ref: '#/components/schemas/FieldTypes' - runtime_field_types: - description: Contains statistics about runtime field data types used in selected nodes. - type: array - items: - $ref: '#/components/schemas/RuntimeFieldTypes' total_field_count: description: Total number of fields in all non-system indices. type: number @@ -219,67 +214,6 @@ components: $ref: '_common.yaml#/components/schemas/ByteCount' required: - field_types - RuntimeFieldTypes: - type: object - properties: - chars_max: - description: Maximum number of characters for a single runtime field script. - type: number - chars_total: - description: Total number of characters for the scripts that define the current runtime field data type. - type: number - count: - description: Number of runtime fields mapped to the field data type in selected nodes. - type: number - doc_max: - description: Maximum number of accesses to doc_values for a single runtime field script - type: number - doc_total: - description: Total number of accesses to doc_values for the scripts that define the current runtime field data type. - type: number - index_count: - description: Number of indices containing a mapping of the runtime field data type in selected nodes. - type: number - lang: - description: Script languages used for the runtime fields scripts. - type: array - items: - type: string - lines_max: - description: Maximum number of lines for a single runtime field script. - type: number - lines_total: - description: Total number of lines for the scripts that define the current runtime field data type. - type: number - name: - $ref: '_common.yaml#/components/schemas/Name' - scriptless_count: - description: Number of runtime fields that don't declare a script. - type: number - shadowed_count: - description: Number of runtime fields that shadow an indexed field. - type: number - source_max: - description: Maximum number of accesses to _source for a single runtime field script. - type: number - source_total: - description: Total number of accesses to _source for the scripts that define the current runtime field data type. - type: number - required: - - chars_max - - chars_total - - count - - doc_max - - doc_total - - index_count - - lang - - lines_max - - lines_total - - name - - scriptless_count - - shadowed_count - - source_max - - source_total IndicesVersions: type: object properties: