From 11dd09d31bbac885c69a4620fbcb1761cb048a1b Mon Sep 17 00:00:00 2001 From: Achyut Jhunjhunwala Date: Wed, 26 Jun 2024 15:52:01 +0200 Subject: [PATCH] Add missing index setting ignore_dynamic_beyond_limit (#2653) (cherry picked from commit 084db754215a47db52b5c288629a21f1737c9081) --- .../elasticsearch-serverless-openapi.json | 4 ++ output/schema/schema.json | 43 ++++++++++++------- output/typescript/types.ts | 1 + specification/indices/_types/IndexSettings.ts | 9 ++++ 4 files changed, 42 insertions(+), 15 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 45513034d2..852abf8888 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -47350,6 +47350,10 @@ "limit": { "description": "The maximum number of fields in an index. Field and object mappings, as well as field aliases count towards this limit.\nThe limit is in place to prevent mappings and searches from becoming too large. Higher values can lead to performance\ndegradations and memory issues, especially in clusters with a high load or few resources.", "type": "number" + }, + "ignore_dynamic_beyond_limit": { + "description": "This setting determines what happens when a dynamically mapped field would exceed the total fields limit. When set\nto false (the default), the index request of the document that tries to add a dynamic field to the mapping will fail\nwith the message Limit of total fields [X] has been exceeded. When set to true, the index request will not fail.\nInstead, fields that would exceed the limit are not added to the mapping, similar to dynamic: false.\nThe fields that were not added to the mapping will be added to the _ignored field.", + "type": "boolean" } } }, diff --git a/output/schema/schema.json b/output/schema/schema.json index ebcea82ce2..6f8e9e03e6 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -119833,7 +119833,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L539-L541" + "specLocation": "indices/_types/IndexSettings.ts#L548-L550" }, { "kind": "interface", @@ -119855,7 +119855,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L543-L550" + "specLocation": "indices/_types/IndexSettings.ts#L552-L559" }, { "kind": "interface", @@ -119909,7 +119909,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L552-L557" + "specLocation": "indices/_types/IndexSettings.ts#L561-L566" }, { "kind": "interface", @@ -119933,7 +119933,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L559-L566" + "specLocation": "indices/_types/IndexSettings.ts#L568-L575" }, { "kind": "enum", @@ -120079,7 +120079,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L434-L441" + "specLocation": "indices/_types/IndexSettings.ts#L443-L450" }, { "kind": "interface", @@ -120101,7 +120101,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L471-L477" + "specLocation": "indices/_types/IndexSettings.ts#L480-L486" }, { "kind": "interface", @@ -120123,7 +120123,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L462-L469" + "specLocation": "indices/_types/IndexSettings.ts#L471-L478" }, { "kind": "interface", @@ -120146,7 +120146,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L443-L451" + "specLocation": "indices/_types/IndexSettings.ts#L452-L460" }, { "kind": "interface", @@ -120169,7 +120169,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L453-L460" + "specLocation": "indices/_types/IndexSettings.ts#L462-L469" }, { "kind": "interface", @@ -120190,9 +120190,22 @@ "namespace": "_types" } } + }, + { + "description": "This setting determines what happens when a dynamically mapped field would exceed the total fields limit. When set\nto false (the default), the index request of the document that tries to add a dynamic field to the mapping will fail\nwith the message Limit of total fields [X] has been exceeded. When set to true, the index request will not fail.\nInstead, fields that would exceed the limit are not added to the mapping, similar to dynamic: false.\nThe fields that were not added to the mapping will be added to the _ignored field.", + "name": "ignore_dynamic_beyond_limit", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "indices/_types/IndexSettings.ts#L424-L432" + "specLocation": "indices/_types/IndexSettings.ts#L424-L441" }, { "kind": "interface", @@ -120966,7 +120979,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L479-L484" + "specLocation": "indices/_types/IndexSettings.ts#L488-L493" }, { "kind": "interface", @@ -121020,7 +121033,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L491-L496" + "specLocation": "indices/_types/IndexSettings.ts#L500-L505" }, { "kind": "interface", @@ -121052,7 +121065,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L486-L489" + "specLocation": "indices/_types/IndexSettings.ts#L495-L498" }, { "kind": "interface", @@ -121120,7 +121133,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L498-L507" + "specLocation": "indices/_types/IndexSettings.ts#L507-L516" }, { "isOpen": true, @@ -121147,7 +121160,7 @@ "name": "StorageType", "namespace": "indices._types" }, - "specLocation": "indices/_types/IndexSettings.ts#L509-L537" + "specLocation": "indices/_types/IndexSettings.ts#L518-L546" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 359a731816..67bbdcb08c 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10602,6 +10602,7 @@ export interface IndicesMappingLimitSettingsNestedObjects { export interface IndicesMappingLimitSettingsTotalFields { limit?: long + ignore_dynamic_beyond_limit?: boolean } export interface IndicesMerge { diff --git a/specification/indices/_types/IndexSettings.ts b/specification/indices/_types/IndexSettings.ts index a74a613085..bfd8890afa 100644 --- a/specification/indices/_types/IndexSettings.ts +++ b/specification/indices/_types/IndexSettings.ts @@ -429,6 +429,15 @@ export class MappingLimitSettingsTotalFields { * @server_default 1000 */ limit?: long + /** + * This setting determines what happens when a dynamically mapped field would exceed the total fields limit. When set + * to false (the default), the index request of the document that tries to add a dynamic field to the mapping will fail + * with the message Limit of total fields [X] has been exceeded. When set to true, the index request will not fail. + * Instead, fields that would exceed the limit are not added to the mapping, similar to dynamic: false. + * The fields that were not added to the mapping will be added to the _ignored field. + * @server_default false + */ + ignore_dynamic_beyond_limit?: boolean } export class MappingLimitSettingsDepth {